In less than four years, the Honest Company Inc. surged to a $1.7 billion private valuation thanks to its marketing of cleaning supplies, diapers and other consumer products that it says are safer and more ecologically friendly than other brands.

The company, co-founded by actress Jessica Alba, is challenging giants such as Procter & Gamble Co. PG, -0.10% and Clorox Co. CLX, +0.62% with a guarantee that its offerings don’t contain what it says are harsh chemicals found in many mainstream products.