Used as a foaming agent or detergent for tough oil-based stains. Sodium lauryl sulfate is an anionic surfactant employed in a wide range of nonparenteral pharmaceutical formulations and cosmetics. It is a detergent and wetting agent effective in both alkaline and acidic conditions.