Home/Documents/South African ID (barcoded book and Smart ID)

Supported document type

Detect tampered and deepfake South African ID (barcoded book and Smart ID)

The South African ID, issued by the Department of Home Affairs as the green barcoded book or the Smart ID card, is the national identity credential for citizens and permanent residents and the default document for KYC at banks and lenders. Its thirteen-digit number encodes the holder's birth date, sex, and citizenship status and ends in a Luhn check digit, so a fabricated or edited card usually contradicts its own number.

API slug: south_africa_id

Last updated:

What a genuine South African ID contains

The number reads YYMMDD for the birth date, then a four-digit sequence where values below 5000 mark female holders and 5000 and above mark male holders, then a citizenship digit of 0 for citizens or 1 for permanent residents, a filler digit, and the check digit. The card shows names, gender, date of birth, citizenship status, country of birth, photograph, and signature, with barcodes on the book and on the Smart ID reverse.

The birth year carries no century, so a two-digit year is ambiguous until it is compared with the printed date of birth. The Smart ID comes in two layouts for regular and long names, and old green books remain valid during the phased replacement, so several designs circulate legitimately and each is scored against its own layout.

How South African ID forgeries are made

  • Luhn check-digit validation

    The final digit is a standard Luhn check over the thirteen digits. A number that fails it was typed rather than issued, whatever the print quality around it.

  • Birth-date decode

    The first six digits are the birth date as YYMMDD. Decoding them and comparing against the printed date of birth, including the century ambiguity, catches assembled cards, and an impossible calendar date fails outright.

  • Sex and citizenship coherence

    The sequence range must agree with the printed gender, and the citizenship digit with the printed status. A card contradicting its own number on either point was edited.

  • Barcode agreement

    Where the barcode can be decoded, its content should agree with the printed names and number. A mismatch points to edited print around a genuine code.

  • Photograph and field patching

    Portrait swaps and edited lines leave cut-line edges, font passes, and resolution steps that differ from the uniform surrounding print.

What TamperCheck checks on a South African ID

TamperCheck runs 200+ forensic checks across three layers and returns a risk score from 0 to 100 with plain-English findings tied to specific regions of the document. These three carry the most weight on this document class.

  • Portrait substitution and face-swap analysis

    The document is isolated from whatever it was photographed on, then the portrait region is assessed against the card surface around it. A pasted or generated face rarely matches the substrate it was placed onto.

  • Barcode and QR payload comparison

    Encoded payloads are decoded and compared against the human-readable values printed alongside them. Editing the visible text without re-encoding the barcode is a common and highly detectable mistake.

  • Date and validity consistency

    Issue, expiry, and period dates are checked against one another and against the file's own creation metadata, which catches backdating and validity extension.

  • And many more checks

    The three above are the layers that carry the most weight on a South African ID. Every upload runs the full suite of 200+ checks regardless of document class, spanning file structure and metadata, pixel-level forensics, font and text rendering, optical and print characteristics, provenance signals, AI-generation signatures, and many more checks.

Who verifies a South African ID, and why

South African banks, lenders, and fintechs. In each case the document is being used to unlock money, access, or a legal status, which is exactly what makes it worth forging.

How to verify a South African ID in 4 steps

  1. Capture the identity page or both card sides

    Photograph the book page or the Smart ID flat at full resolution so the number and any barcode survive close analysis.

  2. Validate the number

    Apply the Luhn computation over the thirteen digits, then decode the birth date, sequence, and citizenship digit.

  3. Compare with the print

    Confirm the encoded birth date, sex range, and citizenship digit agree with the printed fields, remembering that the century must be read from the printed date.

  4. Run a forensic check on the file

    The number carries the structural story, and the print carries the edit history. TamperCheck runs 200+ forensic checks including Luhn validation and number decoding and patch detection, returning a risk score from 0 to 100 with findings tied to specific regions of the image.

Frequently asked questions

What does a South African ID number encode?

Thirteen digits: birth date as YYMMDD, a four-digit sequence that marks sex by range, a citizenship digit, a filler digit, and a Luhn check digit. The structure makes invented numbers fail their own checks.

How is sex shown in the ID number?

The four-digit sequence after the birth date runs from 0000 to 4999 for female holders and from 5000 to 9999 for male holders. A printed gender that contradicts that range is internally inconsistent.

Why is the century not obvious from the number?

The birth date uses a two-digit year with no century, so the printed full date of birth is needed to settle which century applies. Analysis reads the two together rather than trusting the number alone.

How does TamperCheck verify a South African ID?

TamperCheck validates the Luhn check digit, decodes the birth date, sex range, and citizenship digit against the printed fields, and inspects the portrait region for patching. Uploads run through a single REST endpoint, are processed ephemerally and not stored, and findings tie to specific regions.

TamperCheck analyses south african id (barcoded book and smart id) uploads with a hybrid forensic and AI pipeline tuned for this document class. Upload endpoints accept PDF and common image formats; class is inferred automatically. See the API documentation for authentication, async jobs, and webhooks.

Related document types

All supported document types