We demonstrate that the spin-orbit coupling of two-dimensional surface states can be detected locally by scanning-tunneling spectroscopy (STS). The spin splitting of the surface state induces a singularity in the local density of states which can be detected as a distinct peak in the differential conductance spectrum. From the STS spectrum we can determine the Rashba energy as a measure of the strength of the spin splitting. Its detection and imaging are demonstrated for the surface alloys Bi and Pb on Ag(111), which exhibit particularly large spin-split band structures. The influence of the spin splitting on the surface-state STS spectra of close-packed noble metal surfaces is also discussed.