Made on Earth Donate

German ID number checker API

Recognises and checks a German Steuer-ID, social security number, health insurance number, IBAN or Steuernummer, and says what its parts mean.

Tells which kind of German number it was given from its shape alone, then checks its check digit and layout by the official rules and decodes what the parts mean: the issuing pension insurer and birth date in a social security number, the bank behind a German IBAN, the tax office behind a Steuernummer. Nothing is looked up with any authority, so a valid number is well formed, not necessarily issued.

These are personal numbers. Send them in a POST body rather than the query string, which web servers and proxies tend to log.

Endpoint

POST https://supertoolshq.com/api/v1/germany/id-number-checker/   (form-encoded body)
GET  https://supertoolshq.com/api/v1/germany/id-number-checker/

Parameters

NameValuesDefaultMeaning
numberTextrequiredOne number, or a list of up to 500: one per line, or separated by commas, semicolons, tabs or pipes. Spaces, slashes and labels like “Steuer-ID:” are fine; a “Steuernummer:” label makes a 10- to 13-digit number read as one.

Response

FieldTypeMeaning
countsobjectHow many came out valid, invalid and unchecked, and how many repeat an earlier one (duplicates).
resultsarrayOne object per number, in the order sent, with the fields below.
results[].inputstringThe number as sent.
results[].numberstringCompacted: capitals, no spaces or slashes.
results[].formattedstringGrouped the way it is usually printed.
results[].typestring|nullWhat the number is, from its shape: taxid (Steuer-ID (tax ID)), svnr (Social security number), kvnr (Health insurance number), iban (IBAN), stnr (Steuernummer (tax number)). Null when it has none of their shapes.
results[].typeLabelstring|nullThe type in words.
results[].statusstringvalid (every check passed), invalid (see problems) or unchecked (nothing wrong found, but part of it has rules that can’t be checked from the number alone).
results[].validbooleanStatus is valid. Well formed only: no authority, insurer or bank is asked whether the number was issued.
results[].testbooleanA test number from the official specifications, never given to a person.
results[].fieldsarrayThe number’s parts and what each means: pos, value, label, meaning, ok.
results[].birthstring|nullSocial security numbers: the birth date they hold, in words (the century isn’t in the number).
results[].countryobject|nullIBANs: code and English name.
results[].bankobject|nullGerman IBANs: code (the Bankleitzahl), name, town, bic and closed.
results[].taxOfficeobject|nullSteuernummern that fit one tax office: its number, name, street, postcode, town and test.
results[].statestring|nullSteuernummern: the state of that tax office.
results[].elsterstring|nullSteuernummern: the 13-digit nationwide form used in ELSTER, when there is just one.
results[].candidatesarraySteuernummern: every state and tax office whose numbers the printed layout fits, each with elster, state, taxOffice and checkDigitOk. A one-digit typo can land on another office’s valid number, so a fit isn’t proof of whose it is.
results[].problemsarrayWhat is wrong, each as code and text. Empty unless invalid.
results[].notesarraySentences worth reading: a test number, a stand-in birth day, several possible tax offices.
results[].suggestionstring|nullThe number with an O or I among the digits read as 0 or 1, when that makes it valid. The correct check digit is never given.
results[].duplicateOfinteger|nullFor a repeat in a list: the 1-based position of its first copy.

Example

The Steuer-ID from the official specification’s examples:

curl -X POST https://supertoolshq.com/api/v1/germany/id-number-checker/ --data-urlencode 'number=86 095 742 719'
{
    "counts": {
        "valid": 1,
        "invalid": 0,
        "unchecked": 0,
        "duplicates": 0
    },
    "results": [
        {
            "input": "86 095 742 719",
            "number": "86095742719",
            "formatted": "86 095 742 719",
            "type": "taxid",
            "typeLabel": "Steuer-ID (tax ID)",
            "status": "valid",
            "valid": true,
            "test": false,
            "fields": [
                {
                    "pos": "1–10",
                    "value": "8609574271",
                    "label": "Identification number",
                    "meaning": "Random: it says nothing about you, your birthday or your tax office",
                    "ok": true
                },
                {
                    "pos": "11",
                    "value": "9",
                    "label": "Check digit",
                    "meaning": "Matches the first 10 digits",
                    "ok": true
                }
            ],
            "birth": null,
            "country": null,
            "bank": null,
            "taxOffice": null,
            "state": null,
            "elster": null,
            "candidates": [],
            "problems": [],
            "notes": [],
            "suggestion": null,
            "duplicateOf": null
        }
    ]
}

A list

Up to 500 numbers of any mix of types in one call. Here a social security number, the Steuer-ID above with a typo, and a Steuernummer of a test tax office:

curl -X POST https://supertoolshq.com/api/v1/germany/id-number-checker/ --data-urlencode $'number=15 070649 C 103\n86 095 743 719\n93/815/08150'
{
    "counts": {
        "valid": 2,
        "invalid": 1,
        "unchecked": 0,
        "duplicates": 0
    },
    "results": [
        {
            "input": "15 070649 C 103",
            "number": "15070649C103",
            "formatted": "15 070649 C 103",
            "type": "svnr",
            "typeLabel": "Social security number",
            "status": "valid",
            "valid": true,
            "test": false,
            "fields": [
                {
                    "pos": "1–2",
                    "value": "15",
                    "label": "Area number",
                    "meaning": "Issued by Deutsche Rentenversicherung Bayern Süd (Lower Bavaria and Upper Palatinate)",
                    "ok": true
                },
                {
                    "pos": "3–8",
                    "value": "070649",
                    "label": "Date of birth",
                    "meaning": "Born 7 June ’49 (the century isn’t in the number)",
                    "ok": true
                },
                {
                    "pos": "9",
                    "value": "C",
                    "label": "Letter",
                    "meaning": "Usually the first letter of the surname at birth",
                    "ok": true
                },
                {
                    "pos": "10–11",
                    "value": "10",
                    "label": "Serial number",
                    "meaning": "Tells apart people with the same area, birth date and letter",
                    "ok": true
                },
                {
                    "pos": "12",
                    "value": "3",
                    "label": "Check digit",
                    "meaning": "Matches the first 11 characters",
                    "ok": true
                }
            ],
            "birth": "7 June ’49",
            "country": null,
            "bank": null,
            "taxOffice": null,
            "state": null,
            "elster": null,
            "candidates": [],
            "problems": [],
            "notes": [],
            "suggestion": null,
            "duplicateOf": null
        },
        {
            "input": "86 095 743 719",
            "number": "86095743719",
            "formatted": "86 095 743 719",
            "type": "taxid",
            "typeLabel": "Steuer-ID (tax ID)",
            "status": "invalid",
            "valid": false,
            "test": false,
            "fields": [
                {
                    "pos": "1–10",
                    "value": "8609574371",
                    "label": "Identification number",
                    "meaning": "Random: it says nothing about you, your birthday or your tax office",
                    "ok": true
                },
                {
                    "pos": "11",
                    "value": "9",
                    "label": "Check digit",
                    "meaning": "Doesn’t match the first 10 digits",
                    "ok": false
                }
            ],
            "birth": null,
            "country": null,
            "bank": null,
            "taxOffice": null,
            "state": null,
            "elster": null,
            "candidates": [],
            "problems": [
                {
                    "code": "checksum",
                    "text": "The check digit (the 11th) doesn’t match the first 10 digits, so at least one digit is mistyped. The check can’t tell which one: compare it digit by digit with the letter from the tax office or your payslip."
                }
            ],
            "notes": [
                "If this is a Steuernummer (from your tax office, not the Steuer-ID), write it with its slashes as printed on the tax office’s letter, like 198/815/08152."
            ],
            "suggestion": null,
            "duplicateOf": null
        },
        {
            "input": "93/815/08150",
            "number": "9381508150",
            "formatted": "93/815/08150",
            "type": "stnr",
            "typeLabel": "Steuernummer (tax number)",
            "status": "valid",
            "valid": true,
            "test": true,
            "fields": [
                {
                    "pos": "Group 1",
                    "value": "93",
                    "label": "Tax office",
                    "meaning": "Testfinanzamt Hamburg (Hamburg)",
                    "ok": true
                },
                {
                    "pos": "Group 2",
                    "value": "815",
                    "label": "District",
                    "meaning": "The office’s district (Bezirk)",
                    "ok": true
                },
                {
                    "pos": "Group 3",
                    "value": "08150",
                    "label": "Your number and check digit",
                    "meaning": "You within that district; the last digit is the check digit, and it matches",
                    "ok": true
                }
            ],
            "birth": null,
            "country": null,
            "bank": null,
            "taxOffice": {
                "number": "2293",
                "name": "Testfinanzamt Hamburg",
                "street": null,
                "postcode": null,
                "town": null,
                "test": true
            },
            "state": "Hamburg",
            "elster": "2293081508150",
            "candidates": [
                {
                    "elster": "2293081508150",
                    "state": "Hamburg",
                    "taxOffice": {
                        "number": "2293",
                        "name": "Testfinanzamt Hamburg",
                        "street": null,
                        "postcode": null,
                        "town": null,
                        "test": true
                    },
                    "checkDigitOk": true
                }
            ],
            "problems": [],
            "notes": [
                "It belongs to one of ELSTER’s test offices: this is a test number, never given to a taxpayer."
            ],
            "suggestion": null,
            "duplicateOf": null
        }
    ]
}

Errors

A wrong number is not an error: it is a result with status invalid and its problems. HTTP 400 is only for a request with no number, more than 500, or over 64 KB:

{
    "errors": {
        "number": "Required: a Steuer-ID, social security number, health insurance number, IBAN or Steuernummer, or a list of them."
    }
}

From code

// JavaScript
const res = await fetch('https://supertoolshq.com/api/v1/germany/id-number-checker/', { method: 'POST', body: new URLSearchParams({ number: '86 095 742 719' }) });
const [r] = (await res.json()).results;
console.log(r.type, r.status);
# Python
import json, urllib.parse, urllib.request
body = urllib.parse.urlencode({'number': 'A000500015'}).encode()
r = json.load(urllib.request.urlopen('https://supertoolshq.com/api/v1/germany/id-number-checker/', body))['results'][0]
print(r['typeLabel'], r['valid'])

The conventions every API here follows (methods, errors, versions) are in the API overview.