South African ID Number Generator
Generate valid-format, synthetic South African ID numbers for testing, in bulk.
Generation and validation both run locally using the standard 13-digit format and checksum, so nothing you enter or generate here is sent to a server.
South African ID Number Generator
Generate valid-format, synthetic South African ID numbers for testing, in bulk.
Validate an ID Number
Check the format and checksum of an existing 13-digit ID number, and see what it decodes to. Checked locally; nothing is sent anywhere.
A South African ID number is 13 digits: a date of birth (YYMMDD), a 4-digit sequence number that encodes gender (below 5000 for female, 5000 and above for male), a citizenship digit (0 for citizen, 1 for permanent resident), a legacy digit fixed at 8, and a final Luhn-style checksum digit.
This tool generates format-valid, synthetic numbers for testing signup forms, seeding test databases, or checking validation logic, and can also check whether an existing number is correctly formatted. Nothing you enter or generate here is stored or transmitted.
How the South African ID Number Is Structured
A South African ID number is always 13 digits, and unlike a purely random identifier, every digit means something. The first six (YYMMDD) are the holder's date of birth. Because the year is only two digits, the century has to be inferred: a common convention (the one this tool uses when validating) is to assume the more recent century when the two-digit year is less than or equal to the current two-digit year, and the older century otherwise.
The next four digits are a sequence number, and this is where gender is encoded: values from 0000 to 4999 indicate female, and 5000 to 9999 indicate male. After that comes a single citizenship digit, 0 for a South African citizen or 1 for a permanent resident. The digit after that was historically used to indicate race under apartheid-era regulations and has been fixed at 8 for every ID issued since the current format was standardised, so it no longer carries meaning.
The final digit is a checksum, calculated with a Luhn-style algorithm over the first twelve digits. It sums the digits in odd positions, doubles the number formed by the digits in even positions and sums those digits too, and derives a check value from the total. This is what lets a signup form reject a mistyped ID number before it ever reaches a database, and it is exactly what the validator above checks.
Common Use Cases
Seeding test databases and fixtures
Bulk-generate a batch of format-valid ID numbers to populate a staging database or test suite without ever touching a real person's information.
Testing signup and KYC form validation
Generate ID numbers for specific ages, genders, or citizenship statuses to exercise the edge cases in a registration flow's validation logic.
Debugging a rejected ID number
Paste a number that a form is refusing and see exactly which part fails: the digit count, the checksum, or the encoded date of birth.
Frequently Asked Questions
Are these real South African ID numbers?
No. Every number is synthetically generated to follow the correct 13-digit format and pass the official checksum, but it is not drawn from or matched against any real person or the Department of Home Affairs population register. Use these for testing only, never as proof of identity.
What do the 13 digits mean?
YYMMDD encodes date of birth, the next 4 digits are a sequence number where values below 5000 indicate female and 5000 and above indicate male, the next digit is 0 for a citizen or 1 for a permanent resident, the following digit is a legacy race indicator now fixed at 8, and the final digit is a Luhn-style checksum of the first 12 digits.
Is my data sent to a server?
No. Generation and validation both run entirely in your browser. Nothing you enter or generate here is transmitted or stored anywhere.
Why did validation reject a number I typed?
Either it is not exactly 13 digits, the checksum digit does not match the first 12 digits, or the encoded date of birth is not a real calendar date (for example day 30 in February). Any of these means it is not a correctly formatted South African ID number.
Related Tools
GUID / UUID Generator
Generate UUID v1, v4, and v5 identifiers, in bulk.
Encrypt / Decrypt
AES encryption, SHA/MD5 hashing, Base64, Hex, ROT13.
Password Generator
Generate strong, random passwords.
JSON Formatter
Format, validate, and beautify JSON.
JWT Decoder
Decode and verify JSON Web Tokens.
Timestamp Converter
Convert Unix timestamps, ISO 8601, and human-readable dates.
Regex Tester
Test regular expressions with live match highlighting and group capture.
Cron Expression Builder
Build and validate cron expressions with a plain-English description and next run times.