Coverage · South Africa
South African ID number detection and redaction
OpenAnonymizer finds the South African ID number in text and replaces it with a placeholder when its official label confirms it. It runs on a CPU, with no GPU and no API calls.
At a glance
- Country
- South Africa ZA
- Format
- ID number
- Placeholder
- Each distinct value gets its own number: NATIONAL_ID_1, NATIONAL_ID_2, and so on. Formats from other countries use the NATIONAL_ID placeholder too.
- How it is confirmed
- Official label
- Used for
- Identifying South African citizens and permanent residents, on the green ID book and the smart ID card.
About the ID number
The ID number is issued by the Department of Home Affairs.
It is 13 digits: the date of birth as YYMMDD, four digits that give the sex (0000 to 4999 for women, 5000 to 9999 for men), a digit for citizenship (0 for citizens, 1 for permanent residents), one more digit and a check digit.
How OpenAnonymizer handles it
Confirmed by its label. The library does not verify a check digit for this format, even where one exists. The number is masked when its official label is in the text, in the local language and script.
- It runs locally on a CPU, with no GPU and no API calls, so the text never leaves your machine.
- Every package ships every detector, so this format is covered in each of them.
- It covers 34 languages.
Related formats
The same country, or the same kind of number elsewhere.