Benzofurans, benzothiophenes, and naphthofurans which are substituted by carboxystyrylphenyl groups and their corresponding esters and amides are optical brightening agents useful for whitening and brightening natural and synthetic fibers, papers, resins and the like. The compounds are conveniently prepared by interacting benzofurans, benzothiophenes or naphthofurans, which are substituted by a p-tolyl group, with an aromatic aldehyde or preferably the anil derivative thereof.