Beaked whales (Cetacea: Ziphiidea) of the genera Ziphius and Mesoplodon are so difficult to study that they are mostly known from strandings. How these elusive toothed whales use and react to sound is of concern because they mass strand during naval sonar exercises. A new non–invasive acoustic recording tag was attached to four beaked whales (two Mesoplodon densirostris and two Ziphius cavirostris) and recorded high–frequency clicks during deep dives. The tagged whales only clicked at depths below 200 m, down to a maximum depth of 1267 m. Both species produced a large number of short, directional, ultrasonic clicks with no significant energy below 20 kHz. The tags recorded echoes from prey items; to our knowledge, a first for any animal echolocating in the wild. As far as we are aware, these echoes provide the first direct evidence on how free‐ranging toothed whales use echolocation in foraging. The strength of these echoes suggests that the source level of Mesoplodon clicks is in the range of 200–220 dB re 1 µPa at 1 m. This paper presents conclusive data on the normal vocalizations of these beaked whale species, which may enable acoustic monitoring to mitigate exposure to sounds intense enough to harm them.