WASHINGTON—Google said Wednesday it would ban ads from payday lenders, a move that affects a large segment of the online-lending industry.

Google, owned by Alphabet Inc., said in a blog post that as of July 13, it is banning ads for payday loans and related products, citing its policy to “keep bad ads out” of its system. The company already bans ads for firearms and tobacco.

The...