Echolocating bats and toothed whales hunt and navigate by emission of sound pulses and analysis of returning echoes to form a self-generated auditory scene. Here, we demonstrate a striking functional convergence in the way these two groups of mammals independently evolved the capability to sense with sound in air and water.