The O 12-class submarine consisted of four submarines built for the Royal Netherlands Navy. The ships, with a diving depth of , were used for patrols in the Dutch home waters. The class comprised O 12, O 13, O 14 and O 15. O 12 entered German service in 1943 as UD-2.
The ships were built by two shipyards. O 12, O 13 and O 14 were built by Koninklijke Maatschappij De Schelde in Vlissingen and O 15 in Rotterdam at Fijenoord shipyard.