South Africa ID Number Generator
Generate 13-digit South African ID numbers with birth date, gender, citizenship and Luhn check — synthetic test data only
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.
Generated value
No value yet
Set options, then press Generate.
Generated values are valid in shape but randomized (Test Data).
Examples
Valid ID number
8001015009087Valid — born 1 Jan 1980, serial 5009 (male), citizen, Luhn check 7The serial starts at 5009, the citizenship digit is 0 and the final Luhn digit matches.
Wrong check digit
8001015009088Invalid — check digit is 8 but the first 12 digits require 7 (Luhn)Only the last digit differs, so the date and citizenship checks still pass.
Impossible month
8013015009087Invalid — the first six digits (801301) are not a valid YYMMDD birth dateMonth 13 is rejected before the checksum is computed.
About this tool
The South Africa ID Number Generator produces one 13-digit identity number in the YYMMDD SSSS C A Z layout. Six digits carry the birth date, the four-digit serial marks gender (0000–4999 female, 5000–9999 male), the next digit is citizenship (0 citizen, 1 permanent resident, 2 refugee), and the following digit was historically used for race and is now usually 8.
The final digit is a Luhn check digit over the preceding 12. The validator checks that the birth date is real, that the citizenship digit is 0, 1 or 2, and that the Luhn check passes, and it names the part that failed. That makes it a good complement to the VAT tool: one exercises a date and flag check, the other a pure checksum.
These values are synthetic test data for QA and development: never use them on real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.
What this tool does not do
- The validator does not enforce the 0000–4999 female and 5000–9999 male serial ranges.
- The 12th digit is accepted as any value; it was historically used for race and is not validated.
- The number does not state its century, so 800101 could decode to 1980 or 2080 and only 1900/2000 are tested.
- A passing value proves the structure only, not that Home Affairs ever issued the number.
How to use this tool
Choose the SA ID option
The tool is pinned to the 13-digit South African ID number with the Luhn check digit.
Generate a value
Click Generate to create one number with a real birth date, a gender serial, a citizenship digit and the usual 8.
Validate or copy
Switch to Validate to check the date, citizenship digit and checksum, or copy the result and download it as .txt.
Use cases
Onboarding fixtures
Fill South African identity fields with numbers whose birth date and citizenship digit decode correctly.
Gender serial tests
Check that your parser treats serials below and above 5000 as different genders.
Checksum comparison
Verify your Luhn implementation against 8001015009087 and a one-digit variant.
South African ID layout
| Part | Meaning |
|---|---|
| Digits 1-6 | Birth date, YYMMDD |
| Digits 7-10 | Serial: 0000–4999 female, 5000–9999 male |
| Digit 11 | Citizenship: 0 citizen, 1 permanent resident, 2 refugee |
| Digit 12 | Historically race, now usually 8 |
| Digit 13 | Luhn check digit |
The validator checks the date, the citizenship digit and the checksum, not the gender serial range.
Common mistakes
Mistake:Assuming the 12th digit still encodes race
Fix:It historically did; modern numbers usually carry 8 and the validator does not check it.
Mistake:Reading a two-digit year as a fixed century
Fix:The validator accepts 1900 or 2000 for the same YYMMDD, so test both interpretations.
Mistake:Expecting the serial range to be enforced
Fix:The validator allows any 4-digit serial, so an out-of-range gender code will not be flagged.
Frequently asked questions
Are these real South African ID numbers?
No. They are synthetic values for QA and development, never for real applications, KYC checks, tax filings, or identity documents. A valid-looking value can coincide with an issued number; DevTools accepts no liability for how generated data is used.
How does the ID number encode gender?
The four-digit serial marks gender: 0000 to 4999 is female and 5000 to 9999 is male. The validator checks the date, citizenship and checksum, not the serial range.
What does the citizenship digit mean?
0 marks a citizen, 1 a permanent resident and 2 a refugee, and the validator rejects any other value in that position.
What is the 12th digit for?
It was historically used for race and is now usually 8. The validator accepts any value there and does not check it.
How is the check digit calculated?
The 13th digit is a Luhn check digit over the first 12 digits, and it can be recomputed to confirm whether a pasted number is correctly formed.
Related tools
South Africa VAT Number Generator
Generate synthetic 10-digit South African VAT numbers starting with 4, with a Luhn check digit.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
Tax Number Generator
Generate valid tax identification numbers for testing (TR, US, SG, etc.)
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.