Guides

Detect and redact national ID numbers

National identifiers look like any other number, so a plain pattern would flag order numbers and invoice numbers too. Most of them carry a check digit, and the anonymizer only reports a number when that check passes. Some formats are too generic even with a check digit; those are only reported after a keyword such as "SSN" or "TFN" on the same line.

Choose the locale pack that matches your text. Emails, phones, IBANs, cards, keys, names and addresses are found in every pack; the national identifiers are specific to it.

Locale packIdentifierFormatHow it is checked
English (US)Social Security number123-45-6789Number ranges that are never issued are excluded; without dashes only after "SSN"
English (US)ITIN9XX-7X-XXXXStarts with 9, middle group in the ITIN ranges
English (UK)National Insurance numberAB 12 34 56 CLetters that are never used are excluded
English (UK)NHS number943 476 5919Mod 11 check digit; without spaces only after "NHS"
English (Ireland)PPS number1234567TMod 23 check letter
English (Canada)Social Insurance Number046 454 286Luhn check; without spaces only after "SIN"
English (Australia)Tax file number123 456 782Weighted mod 11, after "TFN"
English (Australia)Medicare number2123 45670 1Weighted check digit, after "Medicare"
German (Germany)Tax ID (Steuer-ID)26 954 371 827ISO 7064 MOD 11,10
German (Germany)Pension insurance number65 170839 J 003Birth date and weighted check digit
German (Austria)Social security number (SVNR)1237 010180Weighted mod 11 and birth date
German (Switzerland)AHV number756.9217.0769.85Prefix 756 and EAN-13 check digit
French (France)Social security number (NIR)1 85 05 78 006 084 91Key = 97 − (number mod 97), Corsica's 2A/2B included
Spanish (Spain)DNI and NIE12345678Z, X1234567LMod 23 check letter
Italian (Italy)Codice fiscaleRSSMRA85T10A562SCheck letter from the odd/even tables
Dutch (Netherlands)BSN111222333Eleven test, after "BSN"

Other checksummed values, in every pack

The examples above are published sample numbers or made up to pass the check; they belong to no one. Is your country missing? The locale packs grow over time, and the custom terms list catches any value you add by hand meanwhile.