The chemicals in carpet cleaners can vary a lot: some are just water, soap and natural fragrances, others may contain bleach, enzymes and stronger organic solvents. While “organic solvent” sounds healthy, they’re actually dangerous chemicals, are unsafe to inhale frequently or in large quantities.
One common solvent is butoxyethanol, used to help clean up oil spills and has been associated in high doses with tumors in rats. Some carpet solvents also contain corrosive ingredients like glycolic acid, used in cosmetic skin peels which can cause skin irritation on contact.
This isn’t to say you shouldn’t get your carpets cleaned or treat stains, though, just opt for cleaning without organic solvents and volatile organic compounds (VOCs)– you may find a service in your area that offers this. If you must do it yourself and use the industrial-strength stuff, ventilate well, wear a mask and gloves and avoid the area until it’s completely dry.