Some snorkels have float-operated valves attached to the end away from the user's mouth to keep water out when the swimmer submerges. Most, however, are allowed to flood, and the water expelled by a sharp exhalation through the snorkel when the swimmer returns to the surface.
A snorkel (also spelled "schnorkel" and "schnorchel") is also a device that allows a submarine to operate submerged while still taking in air from above the surface. It was invented by the Dutch just before World War II and perfected by the Germans during the war for use by U-boats.
Until the advent of nuclear power, submarines were designed to operate on the surface most of the time and submerge only for evasion or for rare daylight attacks. In 1940 at night a U-boat was safer on the surface than submerged, because ASDIC could detect boats underwater but was useless against a surface vessel. However, with the continued improvement in methods of detection and attack as the war progressed, the U-boat was forced to spend more and more time underwater, running on electric motors which gave speeds of only a few knots and had very limited endurance.
The 1940 defeat of the Netherlands by the Wehrmacht was a stroke of luck for the Kriegsmarine. The Dutch had been working on a device that the German called somewhat rudely the "Schnorchel". The Dutch navy had been experimenting as early as 1938 with a simple pipe system on the submarines O-19 and O-20, which enabled them to operate at periscope depth to operate its diesels and thus have almost unlimited underwater range.
The Kriegsmarine at first gave some consideration to the snorkel as a means to take fresh air into the boats but saw no need to run the diesel engines underwater. In 1943, however, as more U-boats were lost, it was retrofitted to the VIIC and IXC classes and designed into the new XXI and XXIII types.
The first boat to be fitted with a snorkel was U-58 which experimented with the equipment in the Baltic during the summer of 1943. Boats began to use it operationally in early 1944 and by June 1944 about half of the boats stationed in the French bases had snorkels fitted.
On Type VII boats the snorkel folded forward and was stored in a recess on the port side of the hull while on the IX Types the recess was on the starboard side. The XXI and XXIII types both had telescopic masts that rose vertically through the conning tower close to the periscope.
Snorkels created several problems for their users. A U-boat with a snorkel raised was limited to six knots to avoid breaking the tube, and its sound detection gear was deafened by the roaring of the air being sucked down the tube. A submarine that stayed underwater for more than a few hours encountered various disposal problems, and had to store garbage internally, further fouling boats already infamous for their odors. Most dramatically, snorkels were equipped with automatic valves to prevent seawater from being sucked into the diesels, but when these valves slammed shut, the engines would draw air from the boat itself before shutting down, which was extremely painful to the ears of the crew and sometimes even ruptured eardrums. (This last problem still exists in modern submarines, though their larger internal volumes of air mitigates the pain somewhat.)