The Anatomy of an RSA ID Number

Every South African citizen or resident is issued with a 13 digit ID number in the format YYMMDD GSSS CAZ, where:

  • YYMMDD is the date of birth. Note this means that a person born on 1 Jan 1900 and 1 Jan 2000 will have the same first 6 digits (000101);
  • G indicates gender, where females are assigned sequential numbers in the range 0-4 and males from 5-9;
  • SSS is a sequence number of the birth registered on that birth date;
  • C indicates citizenship, where 0 is a SA citizen, and 1 is a permanent resident (only citizens can vote);
  • A is usually an 8 (could also be a 9 according to DHA [1]). Prior to 1986 [2] this number was used to indicate the holder’s race;
  • Z is a checksum digit.

The checksum digit (Z) is calculated using the Luhn algorithm :
A = The sum of the odd-positioned digits (positions 1,3,5,7,9,11 and excluding 13/Z)
B = The concatenation of the even-positioned digits (positions 2,4,6,8,10,12)
C = The sum of the digits in the result of B x 2
D = A + C
Z = 10 – (D mod 10) [3]

Thus, for a theoretical ID number of a South African Resident female born on 22 November 2000, with ID number 001122 3344 182, the calculation of the check bit in red is as follows:

A = 0 + 1 + 2 + 3 + 4 + 1 = 11
B = 012348
C = 012348 x 2 = 24696
C = 2 + 4 + 6 + 9 + 6 = 27
D = 11 + 27 = 38
Z = 10 - (38 % 10) = 10 - 8 = 2

Note also, that the fictitious ID number 001122 3344 182 is valid for a birth date of 22 November 1900 as well as 22 November 2000.

An excellent spreadsheet by Robert MacLean which implements this check for your reuse is available from here.

And that’s that.

1. Note in the new ID books a note on this bit says, “Usually 8. If yours is a 9 please ensure that you have a letter confirming authentication of your ID documents from Home Affairs.”

2. Identification Act No 72 of 1986 repealed the 1952 Blacks (Abolition of Passes and Co-ordination of Documents) Act and large portions of the 1950 Population Registration Act. Identity numbers would no longer reflect a person’s race group in terms of the 1950 Population Registration Act or any other law. Influx control regulations were lifted and passes were to be replaced by a uniform identity document for all population groups.

3. The mod or Modulo operator as used here effectively returns the rightmost digit of the number on the left. If the result of the mod operation is a 0, then Z turns out to be 10 – 0 = 10. In this instance the the resulting check bit is 0.

NOTE: To validate South African ID number using Javascript, try this.

6 Replies to “The Anatomy of an RSA ID Number”

  1. Point 1: Generally this digit is a 9 when there are more than 5000 people registered for the same day. Many people do not know their actual birth date, so they have been registered on 1 January for the year they were born. At this stage, a 9 only exists for people with a birth date of 1 January.

    1. For a female the sequence starts at 0000 and ends at 0999. When registering female 1001 that day, the sequence is 1000.

      For a make, the sequence starts at 5000 and ends at 5999. When registering male 1001 that day, the sequence is 6000.

      I think you meant to ask, what if more that 5000 people are registered per day. Because from 0000-4999 is 5000 sequence numbers, and from 5000-9999 is 5000 sequence numbers.

      In that case, the 8 in the second last digit is flipped to a 9 in order to provide yet another 5000 sequence numbers for that day.

      So if today there was 5033 boys registered, then the ID number for that boy would be 160504503309z where z is the checkbit (which I have not calculated).

      Does that make sense?

      Ps. See comment below from Selwyn Jackson.

  2. Hi

    I am trying to trace a marriage certificate for my great grandfather who was an italian national. His ID card issued in 1938 is 335688071 W. Home affairs can’t trace this ID number, do you perhaps know how this works in relations to the current format, or what the ‘W’ means?

Leave a Reply