Generator · German data

German Personalausweis number

Endpoint GET /v1/de/personalausweis

What it covers

Returns a valid German Personalausweis document number: a 9-character serial from a restricted alphabet plus a correct ICAO 9303 check digit. It encodes no personal data. Set `invalid=true` for a number with a deliberately wrong check digit.

How it’s calculated

A single ICAO 9303 "7-3-1" weighted mod-10 check digit is appended to the 9-character document-number serial.

Algorithm

  1. Take the 9-character serial (the payload). RFD draws it from a restricted alphabet: digits 1-9 (no 0) and the consonants C F G H J K L M N P R T V W X Y Z (no vowels, no B D Q S), but the check-digit math works for any digit 0-9 or letter A-Z.
  2. Convert each of the 9 characters to its ICAO 9303 / ISO 7064 alphanumeric value: digits 0-9 map to 0-9, letters A-Z map to 10-35 (A=10, B=11, ... Z=35).
  3. Assign the repeating position weights 7, 3, 1, 7, 3, 1, 7, 3, 1 to the 9 values, left to right.
  4. Multiply each value by its weight and add all nine products to get a weighted sum S.
  5. Reduce modulo 10: r = S mod 10.
  6. The check digit is (10 - r) mod 10. The final '(... ) mod 10' means a remainder of 0 yields check digit 0, not 10.
  7. Append this single check digit (0-9) to the 9-character serial to form the 10-character document number.

Worked example

Serial T22991293, check digit = ?

Serial: T 2 2 9 9 1 2 9 3
Alphanumeric values: T=29, 2=2, 2=2, 9=9, 9=9, 1=1, 2=2, 9=9, 3=3
Weights:               7,   3,  1,  7,  3,  1,  7,  3,  1
Products: 29*7=203, 2*3=6, 2*1=2, 9*7=63, 9*3=27, 1*1=1, 2*7=14, 9*3=27, 3*1=3
Sum S = 203+6+2+63+27+1+14+27+3 = 346
r = 346 mod 10 = 6
check = (10 - 6) mod 10 = 4

The check digit is 4, so the full document number is T229912934.

Edge cases

  • A weighted sum whose last digit is 0 (r = 0) produces check digit 0, because of the outer 'mod 10' — e.g. it never produces a two-digit '10'.
  • The RFD serial alphabet deliberately excludes 0, the vowels A E I O U, and B D Q S to avoid visually ambiguous characters, but the check-digit math itself accepts the full 0-9 / A-Z alphanumeric set.

Gotchas

  • The check digit uses the ICAO 9303 machine-readable-zone weighting (7,3,1 repeating), NOT Luhn — do not double alternate digits.
  • Letters are folded to their A=10..Z=35 value BEFORE weighting; a naive treatment of letters as 0 or as their position 1-26 gives the wrong result.
  • The value is a synthetic document (card) number, not the ID card's AZR/eID number or any personal data; it carries no birth date or sex encoding.

Parameters

ParameterTypeDescription
countinteger1–1000Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch.
edgebooleanRestrict output to valid edge-case document numbers from the rare corners.
extremebooleanReturn a correct value wrapped in a hostile encoding (untrimmed whitespace, invisible/zero-width characters, BOM, or bidi/combining marks). Homoglyphs are excluded so the value stays machine-parseable; it still validates after normalisation.
invalidbooleanReturn a document number with a deliberately wrong ICAO 9303 check digit.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe full 10-character document number.
serialstringThe 9-character serial (no check digit).
checkDigitintegerThe single ICAO 9303 check digit (0–9).

Other generators for Germany

See all generators for Germany →

The same kind of identifier elsewhere

Try it

Generate a live example below — every response is valid by format and entirely synthetic.