Germany - Formatting standards & code snippets

Here is a complete list of standards and formats used in Germany. It includes a full list of ISO codes, number, date, currency, telephone and address formats. You will also get code examples on how to perform the most common formatting operations in Java, C#, JavaScript and PHP. Multiple resource files are made available, mainly the complete list of states, in different formats such as CSV, XML, JSON, HTML and SQL.

What are the ISO-3166-1 codes for Germany?

  • Alpha-2: DE
  • Alpha-3: DEU
  • Numeric: 276
  • Java Locale Code: de_DE
  • .Net CultureInfo Code: de-DE
  • PHP Locale Code: de_DE

What is the official language in Germany?

  • German

What is the date format in Germany?

The official date format is big-endian, but little-endian is often used

  • Official format: yyyy-MM-dd
    Ex: 2014-12-03 for December 31st 2014
  • Traditional format: dd.MM.yyyy
    Ex: 03.12.2014 for December 31st 2014
Formatting a date in Java:
Locale locale = new Locale("de", "DE");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", locale); // or dd.MM.yyyy
sdf.format(new Date());
Formatting a date in C#:
CultureInfo ci = CultureInfo.GetCultureInfo("de-DE");
DateTime.Now.ToString("yyyy-MM-dd", ci); // or dd.MM.yyyy
Formatting a date in JavaScript:
let date = new Date();
date.toLocaleDateString('de-DE', {year: 'numeric', month: '2-digit', day:'2-digit'});
// in order to get yyyy-MM-dd format, use date.toISOString().substring(0, 10);
Formatting a date in PHP:
date("Y-m-d");
// or date("d.m.Y");

What is the time format in Germany?

The time format in Germany is mostly 24-hour notation.

  • Format: HH:mm[:ss]
    Ex: 09:00 for 09:00 AM and 21:00 for 9:00 PM
Formatting time in Java:
Locale locale = new Locale("de", "DE");
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", locale);
sdf.format(new Date());
Formatting time in C#:
CultureInfo ci = CultureInfo.GetCultureInfo("de-DE");
DateTime.Now.ToString("HH:mm:ss", ci);
Formatting time in JavaScript:
let date = new Date();
date.toLocaleTimeString('de-DE', {hour12: false});
Formatting time in PHP:
date("H:i:s");

What is the numeric format in Germany?

  • Format: 999.999.999,99
    • Group Size: 3
    • Grouping Character: . (dot)
    • Decimal Character: , (comma)
Formatting numbers in Java:
Locale locale = new Locale("de", "DE");
NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
numberFormat.format(999999999.99d);
Formatting numbers in C#:
double d = 999999999.99d;
d.ToString("n", CultureInfo.GetCultureInfo("de-DE")));
Formatting numbers in JavaScript:
let number = 999999999.99;
number.toLocaleString('de-DE');
Formatting numbers in PHP:
$fmt = new NumberFormatter($locale = 'de_DE', NumberFormatter::DECIMAL);
$fmt->format(999999999.99);

What is the currency format in Germany?

  • Format: 999.999.999,99 €
    • Group Size: 3
    • Grouping Character: . (dot)
    • Decimal Character: , (comma)
    • Currency Symbol: €
    • Currency Symbol Position: After number
    • Currency Name: Euro (EUR)
Formatting currency in Java:
Locale locale = new Locale("de", "DE");
NumberFormat numberFormat = NumberFormat.getCurrencyInstance(locale);
numberFormat.format(999999999.99d);
Formatting currency in C#:
double d = 999999999.99d;
d.ToString("c", CultureInfo.GetCultureInfo("de-DE")));
Formatting currency in JavaScript:
let number = 999999999.99;
number.toLocaleString('de-DE', {currency: 'EUR', style: 'currency'});
Formatting currency in PHP:
$fmt = new NumberFormatter($locale = 'de_DE', NumberFormatter::CURRENCY);
$fmt->format(999999999.99);

Download list of states for Germany in CSV, JSON, HTML, SQL and XML


List of states: HTML - Select Control

----------------------------
 Alpha-2 code + Alpha-2 code
----------------------------
<select>
	<option value="BB">BB</option>
	<option value="BE">BE</option>
	<option value="BW">BW</option>
	<option value="BY">BY</option>
	<option value="HB">HB</option>
	<option value="HE">HE</option>
	<option value="HH">HH</option>
	<option value="MV">MV</option>
	<option value="NI">NI</option>
	<option value="NW">NW</option>
	<option value="RP">RP</option>
	<option value="SH">SH</option>
	<option value="SL">SL</option>
	<option value="SN">SN</option>
	<option value="ST">ST</option>
	<option value="TH">TH</option>
</select>

-------------------------------
 Alpha-2 code + name - English
-------------------------------
<select>
	<option value="BW">Baden-Württemberg</option>
	<option value="BY">Bavaria</option>
	<option value="BE">Berlin</option>
	<option value="BB">Brandenburg</option>
	<option value="HB">Bremen</option>
	<option value="HH">Hamburg</option>
	<option value="HE">Hesse</option>
	<option value="MV">Mecklenburg-Western Pomerania</option>
	<option value="NI">Lower Saxony</option>
	<option value="NW">North Rhine-Westphalia</option>
	<option value="RP">Rhineland-Palatinate</option>
	<option value="SL">Saarland</option>
	<option value="SN">Saxony</option>
	<option value="ST">Saxony-Anhalt</option>
	<option value="SH">Schleswig-Holstein</option>
	<option value="TH">Thuringia</option>
</select>

------------------------------
 Alpha-2 code + name - German
------------------------------
<select>
	<option value="BW">Baden-Württemberg</option>
	<option value="BY">Bayern</option>
	<option value="BE">Berlin</option>
	<option value="BB">Brandenburg</option>
	<option value="HB">Bremen</option>
	<option value="HH">Hamburg</option>
	<option value="HE">Hesse</option>
	<option value="MV">Mecklenburg-Vorpommern</option>
	<option value="NI">Niedersachsen</option>
	<option value="NW">Nordrhein-Westfalen</option>
	<option value="RP">Rheinland-Pfalz</option>
	<option value="SL">Saarland</option>
	<option value="SN">Sachsen</option>
	<option value="ST">Sachsen-Anhalt</option>
	<option value="SH">Schleswig-Holstein</option>
	<option value="TH">Thüringen</option>
</select>

---------------------------------
 ISO_3166-2 code + name - English
---------------------------------
<select>
	<option value="DE-BW">Baden-Württemberg</option>
	<option value="DE-BY">Bavaria</option>
	<option value="DE-BE">Berlin</option>
	<option value="DE-BB">Brandenburg</option>
	<option value="DE-HB">Bremen</option>
	<option value="DE-HH">Hamburg</option>
	<option value="DE-HE">Hesse</option>
	<option value="DE-MV">Mecklenburg-Western Pomerania</option>
	<option value="DE-NI">Lower Saxony</option>
	<option value="DE-NW">North Rhine-Westphalia</option>
	<option value="DE-RP">Rhineland-Palatinate</option>
	<option value="DE-SL">Saarland</option>
	<option value="DE-SN">Saxony</option>
	<option value="DE-ST">Saxony-Anhalt</option>
	<option value="DE-SH">Schleswig-Holstein</option>
	<option value="DE-TH">Thuringia</option>
</select>

---------------------------------
 ISO_3166-2 code + name - German
---------------------------------
<select>
	<option value="DE-BW">Baden-Württemberg</option>
	<option value="DE-BY">Bayern</option>
	<option value="DE-BE">Berlin</option>
	<option value="DE-BB">Brandenburg</option>
	<option value="DE-HB">Bremen</option>
	<option value="DE-HH">Hamburg</option>
	<option value="DE-HE">Hesse</option>
	<option value="DE-MV">Mecklenburg-Vorpommern</option>
	<option value="DE-NI">Niedersachsen</option>
	<option value="DE-NW">Nordrhein-Westfalen</option>
	<option value="DE-RP">Rheinland-Pfalz</option>
	<option value="DE-SL">Saarland</option>
	<option value="DE-SN">Sachsen</option>
	<option value="DE-ST">Sachsen-Anhalt</option>
	<option value="DE-SH">Schleswig-Holstein</option>
	<option value="DE-TH">Thüringen</option>
</select>

List of states: CSV

/ States - English //
code,name
DE-BW,"Baden-Württemberg"
DE-BY,"Bavaria"
DE-BE,"Berlin"
DE-BB,"Brandenburg"
DE-HB,"Bremen"
DE-HH,"Hamburg"
DE-HE,"Hesse"
DE-MV,"Mecklenburg-Western Pomerania"
DE-NI,"Lower Saxony"
DE-NW,"North Rhine-Westphalia"
DE-RP,"Rhineland-Palatinate"
DE-SL,"Saarland"
DE-SN,"Saxony"
DE-ST,"Saxony-Anhalt"
DE-SH,"Schleswig-Holstein"
DE-TH,"Thuringia"

// States - German //
code,name
DE-BW,"Baden-Württemberg"
DE-BY,"Bayern"
DE-BE,"Berlin"
DE-BB,"Brandenburg"
DE-HB,"Bremen"
DE-HH,"Hamburg"
DE-HE,"Hesse"
DE-MV,"Mecklenburg-Vorpommern"
DE-NI,"Niedersachsen"
DE-NW,"Nordrhein-Westfalen"
DE-RP,"Rheinland-Pfalz"
DE-SL,"Saarland"
DE-SN,"Sachsen"
DE-ST,"Sachsen-Anhalt"
DE-SH,"Schleswig-Holstein"
DE-TH,"Thüringen"

List of states: JSON

----------------------------------
 ISO-3166-2 code + Name - English
----------------------------------
[
	{code: "DE-BW", name: "Baden-Württemberg"},
	{code: "DE-BY", name: "Bavaria"},
	{code: "DE-BE", name: "Berlin"},
	{code: "DE-BB", name: "Brandenburg"},
	{code: "DE-HB", name: "Bremen"},
	{code: "DE-HH", name: "Hamburg"},
	{code: "DE-HE", name: "Hesse"},
	{code: "DE-MV", name: "Mecklenburg-Western Pomerania"},
	{code: "DE-NI", name: "Lower Saxony"},
	{code: "DE-NW", name: "North Rhine-Westphalia"},
	{code: "DE-RP", name: "Rhineland-Palatinate"},
	{code: "DE-SL", name: "Saarland"},
	{code: "DE-SN", name: "Saxony"},
	{code: "DE-ST", name: "Saxony-Anhalt"},
	{code: "DE-SH", name: "Schleswig-Holstein"},
	{code: "DE-TH", name: "Thuringia"}
]

----------------------------------
 ISO-3166-2 code + Name - German
----------------------------------
[
	{code: "DE-BW", name: "Baden-Württemberg"},
	{code: "DE-BY", name: "Bayern"},
	{code: "DE-BE", name: "Berlin"},
	{code: "DE-BB", name: "Brandenburg"},
	{code: "DE-HB", name: "Bremen"},
	{code: "DE-HH", name: "Hamburg"},
	{code: "DE-HE", name: "Hesse"},
	{code: "DE-MV", name: "Mecklenburg-Vorpommern"},
	{code: "DE-NI", name: "Niedersachsen"},
	{code: "DE-NW", name: "Nordrhein-Westfalen"},
	{code: "DE-RP", name: "Rheinland-Pfalz"},
	{code: "DE-SL", name: "Saarland"},
	{code: "DE-SN", name: "Sachsen"},
	{code: "DE-ST", name: "Sachsen-Anhalt"},
	{code: "DE-SH", name: "Schleswig-Holstein"},
	{code: "DE-TH", name: "Thüringen"}
]

List of states: SQL

-- -----------------------------------------------------
-- Table `state`
-- -----------------------------------------------------
DROP TABLE IF EXISTS state;

CREATE TABLE IF NOT EXISTS state (
  id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  code VARCHAR(6) NOT NULL,
  name_en VARCHAR(50) NOT NULL,
  name_de VARCHAR(50) NOT NULL,
  PRIMARY KEY (id),
  UNIQUE INDEX id_UNIQUE (id ASC),
  UNIQUE INDEX code_UNIQUE (code ASC)
) ENGINE = InnoDB;

-- Alpha-2
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'BW', 'Baden-Württemberg', 'Baden-Württemberg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'BY', 'Bavaria', 'Bayern');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'BE', 'Berlin', 'Berlin');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'BB', 'Brandenburg', 'Brandenburg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'HB', 'Bremen', 'Bremen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'HH', 'Hamburg', 'Hamburg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'HE', 'Hesse', 'Hesse');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'MV', 'Mecklenburg-Western Pomerania', 'Mecklenburg-Vorpommern');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'NI', 'Lower Saxony', 'Niedersachsen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'NW', 'North Rhine-Westphalia', 'Nordrhein-Westfalen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'RP', 'Rhineland-Palatinate', 'Rheinland-Pfalz');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'SL', 'Saarland', 'Saarland');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'SN', 'Saxony', 'Sachsen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'ST', 'Saxony-Anhalt', 'Sachsen-Anhalt');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'SH', 'Schleswig-Holstein', 'Schleswig-Holstein');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'TH', 'Thuringia', 'Thüringen');

-- iso-3166-2
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-BW', 'Baden-Württemberg', 'Baden-Württemberg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-BY', 'Bavaria', 'Bayern');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-BE', 'Berlin', 'Berlin');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-BB', 'Brandenburg', 'Brandenburg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-HB', 'Bremen', 'Bremen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-HH', 'Hamburg', 'Hamburg');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-HE', 'Hesse', 'Hesse');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-MV', 'Mecklenburg-Western Pomerania', 'Mecklenburg-Vorpommern');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-NI', 'Lower Saxony', 'Niedersachsen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-NW', 'North Rhine-Westphalia', 'Nordrhein-Westfalen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-RP', 'Rhineland-Palatinate', 'Rheinland-Pfalz');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-SL', 'Saarland', 'Saarland');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-SN', 'Saxony', 'Sachsen');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-ST', 'Saxony-Anhalt', 'Sachsen-Anhalt');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-SH', 'Schleswig-Holstein', 'Schleswig-Holstein');
INSERT INTO state (id, code, name_en, name_de) VALUES (null, 'DE-TH', 'Thuringia', 'Thüringen');

List of states: XML

<!-- ISO 3166-2 code + name - English -->
<?xml version="1.0" encoding="UTF-8"?>
<states>
	<state>
		<code>DE-BW</code>
		<name>Baden-Württemberg</name>
	</state>
	<state>
		<code>DE-BY</code>
		<name>Bavaria</name>
	</state>
	<state>
		<code>DE-BE</code>
		<name>Berlin</name>
	</state>
	<state>
		<code>DE-BB</code>
		<name>Brandenburg</name>
	</state>
	<state>
		<code>DE-HB</code>
		<name>Bremen</name>
	</state>
	<state>
		<code>DE-HH</code>
		<name>Hamburg</name>
	</state>
	<state>
		<code>DE-HE</code>
		<name>Hesse</name>
	</state>
	<state>
		<code>DE-MV</code>
		<name>Mecklenburg-Western Pomerania</name>
	</state>
	<state>
		<code>DE-NI</code>
		<name>Lower Saxony</name>
	</state>
	<state>
		<code>DE-NW</code>
		<name>North Rhine-Westphalia</name>
	</state>
	<state>
		<code>DE-RP</code>
		<name>Rhineland-Palatinate</name>
	</state>
	<state>
		<code>DE-SL</code>
		<name>Saarland</name>
	</state>
	<state>
		<code>DE-SN</code>
		<name>Saxony</name>
	</state>
	<state>
		<code>DE-ST</code>
		<name>Saxony-Anhalt</name>
	</state>
	<state>
		<code>DE-SH</code>
		<name>Schleswig-Holstein</name>
	</state>
	<state>
		<code>DE-TH</code>
		<name>Thuringia</name>
	</state>
</states>

<!-- ISO 3166-2 code + name - German -->
<?xml version="1.0" encoding="UTF-8"?>
<states>
	<state>
		<code>DE-BW</code>
		<name>Baden-Württemberg</name>
	</state>
	<state>
		<code>DE-BY</code>
		<name>Bayern</name>
	</state>
	<state>
		<code>DE-BE</code>
		<name>Berlin</name>
	</state>
	<state>
		<code>DE-BB</code>
		<name>Brandenburg</name>
	</state>
	<state>
		<code>DE-HB</code>
		<name>Bremen</name>
	</state>
	<state>
		<code>DE-HH</code>
		<name>Hamburg</name>
	</state>
	<state>
		<code>DE-HE</code>
		<name>Hesse</name>
	</state>
	<state>
		<code>DE-MV</code>
		<name>Mecklenburg-Vorpommern</name>
	</state>
	<state>
		<code>DE-NI</code>
		<name>Niedersachsen</name>
	</state>
	<state>
		<code>DE-NW</code>
		<name>Nordrhein-Westfalen</name>
	</state>
	<state>
		<code>DE-RP</code>
		<name>Rheinland-Pfalz</name>
	</state>
	<state>
		<code>DE-SL</code>
		<name>Saarland</name>
	</state>
	<state>
		<code>DE-SN</code>
		<name>Sachsen</name>
	</state>
	<state>
		<code>DE-ST</code>
		<name>Sachsen-Anhalt</name>
	</state>
	<state>
		<code>DE-SH</code>
		<name>Schleswig-Holstein</name>
	</state>
	<state>
		<code>DE-TH</code>
		<name>Thüringen</name>
	</state>
</states>