Cologne Phonetics

What it is

Cologne Phonetics — formally Kölner Phonetik — is a phonetic encoding algorithm designed for German-language names. It maps a word to a sequence of digits representing how it sounds, so that names with different spellings but identical pronunciation produce the same code. It was developed by Hans Joachim Postel in 1969 and remains the standard phonetic algorithm for German.

Soundex was designed around English consonant patterns and fails on distinctly German sounds: it cannot group Meyer with Meier, or handle sch, ph, or the context-sensitive ch that appear throughout German names. Cologne Phonetics replaces Soundex’s English-centric groupings with a table built for German phonology.

How it works

The algorithm processes a string in four passes:

  1. Encode each character to a digit using the Cologne table (see below), applying context-sensitive rules where the following character affects the code assigned.
  2. Remove consecutive duplicate digits — adjacent identical codes are collapsed to one.
  3. Remove all zeros except an initial zero, which signals that the name begins with a vowel. Some implementations drop the leading zero entirely.
  4. No length truncation — unlike Soundex, the code is variable length.

The Cologne digit table:

Code Characters
0 A, E, I, J, O, U, Y
1 B, P
2 D, T (except before C, S, Z)
3 F, V, W; PH
4 G, K, Q
4 C at the start before A, H, K, L, O, Q, R, U, X; CH before A, O, U
6 L
7 M, N
8 R
9 S, Z; C in other positions; SCH, CH before E/I; TS, TZ, DS, DZ

The context-sensitivity of C is the most important rule: before a hard-vowel or guttural consonant it maps to 4 (a K-sound); elsewhere it maps to 9 (an S/SH-sound).

[illustrate: step-by-step Cologne Phonetics encoding of “Schmidt” — character-to-code mapping table with each letter resolving to its digit, then duplicate removal and zero-stripping shown as successive string transformations]

Example

Encoding Schmidt and Schmitt:

SCH → 9  (SCH cluster maps to 9)
M   → 7
I   → 0  (vowel, dropped in middle position)
DT  → 2  (both D and T map to 2; duplicate collapsed)

Both Schmidt and Schmitt converge to the same code — the doubled consonant at the end collapses under the duplicate rule.

Meyer and Meier: the Y/I alternation common in German surnames both map to 0 (a vowel/Y code), so after dropping internal zeros the remaining consonant skeleton is identical: 67.

[illustrate: before/after comparison of “Meyer” and “Meier” both resolving to the same Cologne code, with each character mapped to its digit side by side]

Variants and history

Postel published the algorithm in IBM Nachrichten (1969). No widely adopted variant exists — unlike Soundex, Cologne Phonetics was never generalised beyond German. Some implementations pre-process umlauts (Ä→AE, Ö→OE, Ü→UE, ß→SS) before encoding; others handle them inline. The core table is stable across all serious implementations.

When to use it

Use Cologne Phonetics when matching German-language names against German-language data: genealogy records, civil registers, address databases, or customer data from Germany, Austria, or Switzerland. It outperforms Soundex and Metaphone on German names in all practical benchmarks.

Outside the DACH region, Double Metaphone is the more pragmatic choice — it covers German phonology partially and is available in nearly every language ecosystem. If your data mixes German names with other languages, Double Metaphone’s broader coverage usually wins.

Elasticsearch / OpenSearch users can enable it directly via the analysis-phonetic plugin:

{
  "settings": {
    "analysis": {
      "filter": {
        "cologne_phonetic_filter": {
          "type": "phonetic",
          "encoder": "cologne"
        }
      },
      "analyzer": {
        "german_phonetic": {
          "tokenizer": "standard",
          "filter": ["cologne_phonetic_filter"]
        }
      }
    }
  }
}

In Python, the phonetics package exposes phonetics.cologne_phonetics(word).

See also