German submarine U-1231

German submarine U-1231 was a Type IXC/40 U-boat built for Nazi Germany's Kriegsmarine during World War II.

U-1231 was ordered in October 1941 from Deutsche Werft AG Weser in Hamburg-Finkenwerder under the yard number 394. Her keel was laid down on 31 March 1943 and was launched on 18 November 1943. About three months later she was commissioned into service under the command of Kapitän zur See Hermann Lessing (Crew 21) in the 31st U-boat Flotilla.

After completing training and work-up for deployment U-1231 was transferred to the 33rd U-boat Flotilla for front-line service on 1 October 1944. The U-boat left Bergen on 18 October 1944 for the first war patrol operating unsuccessfully against Allied shipping in the North Atlantic and off the coast of Canada. After returning to Flensburg on 5 February 1945, Lessing was relieved as commander by Oberleutnant zur See Helmut Winke (Crew X/39). In April 1945 'U-1231 left Kiel for the North Atlantic, again operating without success. After the German surrender, Winke took U-1231 to Dundee, from where the U-boat was transferred to Lisahally.

In November 1945, U-1231 was allocated to the Soviet Union as war booty and was transferred to Libau via Copenhagen between 24 November and 5 December 1945. Renamed N-26 the U-boat was commissioned into the Soviet Navy and served with the Red Banner Baltic Fleet. On 29 December 1955, having been re-designated B-26, the U-boat was decommissioned and placed into reserve and used for training purposes. Struck from the list on 31 January 1968 and sold for scrap the U-boat was later broken up in Riga.