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 pack | Identifier | Format | How it is checked |
|---|---|---|---|
| English (US) | Social Security number | 123-45-6789 | Number ranges that are never issued are excluded; without dashes only after "SSN" |
| English (US) | ITIN | 9XX-7X-XXXX | Starts with 9, middle group in the ITIN ranges |
| English (UK) | National Insurance number | AB 12 34 56 C | Letters that are never used are excluded |
| English (UK) | NHS number | 943 476 5919 | Mod 11 check digit; without spaces only after "NHS" |
| English (Ireland) | PPS number | 1234567T | Mod 23 check letter |
| English (Canada) | Social Insurance Number | 046 454 286 | Luhn check; without spaces only after "SIN" |
| English (Australia) | Tax file number | 123 456 782 | Weighted mod 11, after "TFN" |
| English (Australia) | Medicare number | 2123 45670 1 | Weighted check digit, after "Medicare" |
| German (Germany) | Tax ID (Steuer-ID) | 26 954 371 827 | ISO 7064 MOD 11,10 |
| German (Germany) | Pension insurance number | 65 170839 J 003 | Birth date and weighted check digit |
| German (Austria) | Social security number (SVNR) | 1237 010180 | Weighted mod 11 and birth date |
| German (Switzerland) | AHV number | 756.9217.0769.85 | Prefix 756 and EAN-13 check digit |
| French (France) | Social security number (NIR) | 1 85 05 78 006 084 91 | Key = 97 − (number mod 97), Corsica's 2A/2B included |
| Spanish (Spain) | DNI and NIE | 12345678Z, X1234567L | Mod 23 check letter |
| Italian (Italy) | Codice fiscale | RSSMRA85T10A562S | Check letter from the odd/even tables |
| Dutch (Netherlands) | BSN | 111222333 | Eleven test, after "BSN" |
Other checksummed values, in every pack
- IBAN: the mod 97 check of ISO 13616, with or without spaces.
- Card numbers: 13 to 19 digits, Luhn check, issuer ranges of the major networks.
- BIC: bank code, country and location, after "BIC" or "SWIFT".
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.