UD-4 was an O 21-class submarine. The boat was laid down as the Dutch submarine K XXVI and renamed O 26 but was captured during German invasion of the Netherlands in World War II and commissioned in the Kriegsmarine.