MBAS assay

After first acidifying a water sample (with boric acid, for example), one adds to it chloroform and a solution of methylene blue et al. Methylene blue is a cationic dye. The biphasic solution is then agitated to distribute these reagents throughout the aqueous and organic phases. If an anionic surfactant is present, then the cationic methylene blue and the anionic surfactant forms an ion pair, which is extracted into the organic phase. The color saturation of the chloroform increases with the concentration of anionic surfactants.
MBAS assay is an ASTM International standard technique for detecting anionic surfactants. These include carboxylates, phosphates, sulfates, and sulfonates. An MBAS assay alone does not, however, identify specific surfactants.