Saudi Iqama & National ID validator
Validate a 10-digit Saudi national ID (رقم الهوية الوطنية) or Iqama (رقم الإقامة) number. The tool reads the leading digit — 1 for a Saudi citizen ID, 2 for a resident Iqama — and verifies the number with the official Saudi check-digit algorithm, a Luhn variant used by the Ministry of Interior and the Absher platform.
How it works
Both numbers share one 10-digit structure: digit 1 is the identity type, digits 2–9 are the individual serial, and digit 10 is the check digit. The check digit is computed over the first nine digits:
- For each digit in an odd position (1st, 3rd, 5th, 7th, 9th), double it; if the result is two digits, subtract 9 (equivalently sum the two digits).
- Take each even-position digit as-is.
- Sum all nine results.
- The expected check digit is
(10 − (sum mod 10)) mod 10.
The number is valid when that expected digit equals the actual 10th digit and the leading digit is 1 or 2.
Example
For 1012345674, doubling and reducing the odd positions, adding the even ones,
gives a running sum whose last digit produces an expected check of 4 —
matching the final digit, so the number is well-formed and flagged as a Saudi
citizen ID.
| Leading digit | Identity type |
|---|---|
| 1 | Saudi citizen (National ID / Hawiya) |
| 2 | Resident foreigner (Iqama) |
It is privacy-first — nothing leaves your browser. A passing check digit only means the number is mathematically well-formed; it does not prove the number is issued or active in any government system.
When you need to validate a Saudi ID or Iqama
Validation is useful in a variety of everyday situations:
- HR and onboarding. Confirming a job applicant’s or new employee’s ID number is structurally valid before entering it into payroll or GOSI systems. A typo in a single digit can cause GOSI registration failures.
- Vendor or contractor verification. Before making a payment or signing a service contract, confirming the identity number passes the check-digit test reduces data-entry errors.
- KYC in fintech and banking. Financial institutions in Saudi Arabia are required to verify customer identity. Structural validation is the first layer before a live lookup against the National Information Center or Absher.
- Form input validation. Developers building Saudi-facing apps can use the same algorithm to validate ID fields client-side before form submission, reducing invalid entries reaching their backend.
The algorithm in plain language
The check-digit algorithm used on Saudi IDs is a variant of the Luhn algorithm — the same family of algorithm used on credit card numbers and many national ID systems globally. The key adaptation is in how it handles odd positions: where the standard Luhn doubles odd-position digits, the Saudi variant doubles and then applies the “subtract 9 if ≥ 10” reduction rather than digit-summing. The result is a final digit that a forger who changes a single digit will almost certainly get wrong, making the algorithm an effective filter for casual transcription errors and modified numbers.
Structural limitations
This validator catches:
- Wrong number of digits (not exactly 10)
- Leading digit other than 1 or 2
- Check-digit mismatch (the 10th digit does not match what the algorithm computes for the first 9)
It does not catch:
- Numbers with the correct structure but never issued
- Expired documents (an Iqama can be structurally valid but expired)
- Identity theft or document fraud where a genuine number is misused
- Numbers belonging to a different person than claimed
For authoritative verification, use Absher (the Ministry of Interior’s digital platform) or the IQAMA verification services available to licensed Saudi businesses through the National Information Center.