Axon Toolbox

Free telecom & identity tools · runs in your browser

Free tool

South African ID Number Generator & Validator

Generate valid test South African ID numbers with scannable barcodes — by age or exact date of birth, gender and citizenship — or paste an ID number to check its date, gender and Luhn check digit.

SA ID Generator

Choose a date of birth and gender. The date, gender sequence and citizenship digits are set from your inputs; the check digit is calculated with Luhn.

Flag of South Africa

South Africa · 13 digits

Born 2005

1 – 31

1 – 100

SA ID Validator

Paste a 13-digit ID number to check the date of birth, gender, citizenship and Luhn check digit.

How a South African ID number is structured

An SA ID number is 13 digits and every one of them means something. Taking 800101 5009 0 8 7 as an example:

The segments of a 13-digit South African ID number
DigitsSegmentMeaning
800101YYMMDDDate of birth — 1 January 1980. Only two year digits are stored, so the century is inferred from context.
5009Gender sequence0000–4999 female, 5000–9999 male. The sequence also distinguishes people born on the same day.
0Citizenship0 for a South African citizen, 1 for a permanent resident.
8Legacy digitHistorically a race classifier under apartheid. No longer used — it is 8 on all modern ID numbers.
7Check digitA Luhn (ISO/IEC 7812) check digit over the preceding twelve digits, used to catch typing and scanning errors.

Because the date of birth and gender are encoded in the number itself, an ID number is self-describing — which is exactly why validation rules in registration and KYC systems check the date and the checksum rather than just the length.

Why generate test ID numbers?

Any system that accepts an SA ID number needs realistic data to test against — SIM registration and RICA flows, bank and mobile-money onboarding, KYC and AML checks, government service portals, and the barcode scanners used at enrolment desks.

Using real ID numbers in a test environment is both a privacy risk and, under POPIA, a compliance one. Synthetic numbers that are structurally valid let you exercise the same code paths — format checks, date parsing, gender derivation, checksum validation, barcode scanning — without any real personal information ever entering your test systems.

Frequently asked questions

What is a South African ID number?
It is the 13-digit number issued by the Department of Home Affairs that identifies a citizen or permanent resident. It is not random: the first six digits are the date of birth, the next four encode gender, then a citizenship digit, a legacy digit and finally a Luhn check digit.
How is gender encoded in an SA ID number?
By digits 7 to 10, read as a single number. 0000–4999 indicates female and 5000–9999 indicates male. Within each range the sequence simply distinguishes people registered with the same date of birth.
Are these real South African ID numbers?
No. Every number this tool produces is randomly generated test data that happens to be structurally valid and pass a Luhn check. The numbers are not issued by Home Affairs and do not belong to any real person. Never use them to impersonate anyone or to complete a real application.
How do I validate a South African ID number?
Check that it is exactly 13 digits, that the first six form a real calendar date, and that the final digit satisfies the Luhn algorithm over the preceding twelve. The validator on this page performs all three checks and shows you which one failed.
What does the eleventh digit mean?
It is the citizenship digit: 0 for a South African citizen and 1 for a permanent resident. The twelfth digit is a legacy field that historically recorded race classification under apartheid; it is no longer used and is 8 on modern IDs.
Why would I need generated ID numbers?
To test software without touching real personal data. Registration flows, KYC and RICA checks, onboarding forms, barcode scanners and database validation rules all need realistic input, and using synthetic numbers keeps live personal information out of your test environments.