A water sprayer and heater assembly for windshield wiper is disclosed to include a controller; a water container connected between a water supply pipe and a water spray tube at the windshield wiper, a water pressure switch electrically connected to the controller and set in communication between the water supply pipe and the water inlet of the water container, and an electric heater mounted in the water container and electrically connected to the controller and controllable by the controller to heat water in the water container when a flow of water passes from the water supply pipe through the water pressure switch into the water container.