Alphabetising German text is not as simple as a plain Unicode sort, because the umlauts ä, ö, ü and the sharp-s ß have no fixed position in the basic Latin order. Germany’s DIN 5007 standard defines two accepted rules, and which one is correct depends on whether you are building a dictionary or a name index. This tool applies either rule to a list you paste in.
How it works
Before comparing two words, each is transformed into a sort key in lowercase, then the umlauts are replaced according to the chosen rule:
DIN 5007-1 (dictionary) ä → a ö → o ü → u ß → ss
DIN 5007-2 (phone book) ä → ae ö → oe ü → ue ß → ss
The keys are then compared character by character. When two keys are equal — for example Müller and Muller both reduce to muller under DIN 5007-1 — the original spellings are used as a stable tie-break so the order stays deterministic.
Which rule to use
Use DIN 5007-1 for glossaries, dictionaries and indexes where you want Apfel and Äpfel to sit next to one another. Use DIN 5007-2 for telephone directories, customer lists and any roster of surnames, because it keeps umlaut spellings (Müller) and their ASCII variants (Mueller) collated together, which matters when people may have registered either form.
Side-by-side comparison example
Given the names Müller, Mueller, Muller and Maier:
| Position | DIN 5007-1 (dictionary) | DIN 5007-2 (phone book) |
|---|---|---|
| 1 | Maier | Maier |
| 2 | Muller | Mueller |
| 3 | Müller | Müller |
| 4 | Mueller | Muller |
Under DIN 5007-1 the umlaut ü counts as plain u, so Müller and Muller sort together, with Mueller (ue) trailing. Under DIN 5007-2 the umlaut ü expands to ue, pulling Mueller and Müller into the same neighbourhood — which is why phone directories use this rule. Both rules treat ß identically to ss everywhere, so Straße and Strasse always collate at the same position.
Why plain Unicode sort fails for German
A naive Unicode sort places all characters with diacritics (ä, ö, ü, ß) either before a or after z depending on their code points — producing results no German reader would recognise as correct. For example a plain sort might put ähnlich at the very start of the alphabet rather than near ahnlich. DIN 5007 rules prevent this and are the standard used in German publishing and public directories.
Edge cases to know
- Capital umlauts (Ä, Ö, Ü, ẞ) are normalised the same way as their lowercase equivalents for sorting purposes.
- Ligatures and compound particles like
von,von der, anddein German surnames are sometimes stripped for sorting in genealogical records, but that logic is not applied here — the name is sorted as entered. - Numbers and punctuation sort before letters in Unicode order; items beginning with a digit will appear first unless you strip them before pasting.