U-87 may refer to one of the following German submarines:
- SM U-87, a Type U 87 submarine launched in 1916 and that served in the First World War until sunk on 25 December 1917
- During the First World War, Germany also had this submarine with a similar name:
- SM UB-87, a Type UB III submarine launched in 1917 and surrendered on 20 November 1918; broken up at Brest in 1921
- During the First World War, Germany also had this submarine with a similar name:
- German submarine U-87 (1941), a Type VIIB submarine that served in the Second World War until sunk on 4 March 1943