It is used as a disinfectant and preservative in the water and wastewater treatment industry. It can effectively kill bacteria, viruses, and other microorganisms. Formaldehyde is commonly used in the disinfection of wastewater and the preservation of water samples for laboratory analysis.