Skip to main content

South African ID Number Validator

Validate 13-digit South African ID Numbers in real time using the Luhn algorithm.

South African ID Validation

Validates the 13-digit format (YYMMDDSSSSCAZ), checking birth date, citizenship flag, and the Luhn check digit.

Ensures compliance for South African fintech, banking, and identity verification systems.

Anatomy & Structure of South African ID Number — South Africa

The South African Identity Number consists of 13 numeric digits in 5 parts:

PositionFieldLengthMeaning & RuleExample
1 to 6Date of Birth (YYMMDD)6 digitsYear (2 digits), Month (01–12), and Day (01–31)900115
7 to 10Gender & Daily Sequence4 digits0000–4999 = Female; 5000–9999 = Male5023
11Citizenship Status1 digit0 = SA Citizen; 1 = Permanent Resident0
12Historical / System Digit1 digitOfficially 8 (post-1994)8
13Check Digit1 digitCalculated via **Luhn (Modulo 10)** algorithm4

Official Algorithm (Luhn Modulo 10 — DHA South Africa)

Official check digit calculation for South African ID:

A = Σ d[odd]; B = concat(d[even]) * 2; D = sum_digits(B); DV = (10 - ((A + D) mod 10)) mod 10
  1. 1. Sum odd position digits (1, 3, 5, 7, 9, 11) into total A.
  2. 2. Concatenate even position digits (2, 4, 6, 8, 10, 12) and multiply by 2 to get B.
  3. 3. Sum all individual digits of B into D.
  4. 4. Calculate total E = A + D.
  5. 5. The check digit is DV = (10 - (E mod 10)) mod 10.

Frequently Asked Questions