Home🇿🇦 South AfricaNational Identity Number

National Identity Number generator (South Africa)

A South African ID number is thirteen digits — date of birth (YYMMDD), a gender serial, a citizenship digit, and a Luhn check digit. These test values are synthetic but Luhn-valid.

Synthetic · not collision-guaranteed Validate a number →
620115 9810 181

Synthetic ID number (Luhn-valid). Not a real issued number.

Format specification

IdentifierNational Identity Number
Country🇿🇦 South Africa
Format000000 0000 000
Length13 characters
ChecksumLuhn
Example710427 1017 082
Safe strategy Synthetic
Data qualityVerified against sources

National Identity Number: what each part means

000000 Date of birth as YYMMDD.
0000 Gender serial: 0000–4999 for women, 5000–9999 for men. Test values use random digits.
0 Citizenship: 0 = South African citizen, 1 = permanent resident.
8 Legacy "A-digit" — historically a race classifier, fixed at 8 on modern numbers.
0 Luhn check digit over the first twelve digits.

Validation regex

Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()

^\d{13}$

References

  1. en.wikipedia.org/wiki/South_African_identity_card

Common questions

Will these pass my validation?

Yes — they are well-formed National Identity Number values (000000 0000 000) and pass standard format checks, including the Luhn checksum.

Could one belong to a real person?

These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.

Can I generate many at once?

Increase the count, or use the free API and CSV/JSON export for large datasets.

Validate an existing number →

For software testing only. These numbers are synthetic and must never be used for real-world identification, applications, or to impersonate anyone.