Environmental safety refers to the state of protection of the natural environment and humans by ensuring an acceptable level of negative impact of natural and anthropogenic environmental hazards on the environment and humans. Based on the principles of nature similarity, resource substitution and conservation, modules and components of environmental safety of drinking water treatment and wastewater treatment processes have been formed. The functions of each module of the aquatic safety ecosystem are disclosed. Dangerous events and hazard factors in the processes of water treatment and water treatment are presented. The content of the system components of environmental safety of water treatment and wastewater treatment processes has been established: sanitary and epidemiological safety, consumer safety, technical safety, environmental safety of production and environmental and economic safety. An algorithm for the environmentally sustainable functioning of water management facilities, long-term and trouble-free operation of water treatment equipment, preservation of the health of water consumers and minimizing the impact on reservoirs, natural water sources (underground and surface) is proposed.