DevTools Logo

Saudi National ID & Iqama Generator

Saudi National ID & Iqama Generator

Generate 10-digit Saudi National ID (1…) and Iqama (2…) numbers with the Luhn check digit — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Citizen National ID

    Input
    1000000008
    Output
    Valid — starts with 1 (citizen), Luhn check digit 8

    The leading 1 marks a citizen record; the final 8 satisfies the Luhn check.

    Iqama number

    Input
    2000000006
    Output
    Valid — starts with 2 (Iqama), Luhn check digit 6

    Resident foreign nationals are represented by the 2 prefix, and the checksum differs accordingly.

    Wrong check digit

    Input
    1000000009
    Output
    Invalid — check digit is 9 but the first nine digits require 8 (Luhn)

    Only the last digit differs, so the length and prefix branches still pass.

    About this tool

    The Saudi National ID & Iqama Generator produces one 10-digit number. Citizen National IDs start with 1, and Iqama numbers for resident foreign nationals start with 2. The 10th digit is a Luhn check digit computed over the first nine digits.

    The format is community-documented rather than officially published, so the Luhn rule and the 1/2 leading digit are the widely used convention, not a published specification. The validator checks the length, rejects any other leading digit, recomputes the check and labels the value as citizen or resident when it passes.

    These values are synthetic test data for QA and development: never use them on real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • The check digit rule is community-documented, not an official published algorithm.
    • Validation cannot confirm that a number was issued or that the holder's status is current.
    • Only the 10-digit National ID and Iqama are covered; the VAT number has its own tool.
    • A valid value is indistinguishable in shape from a real ID, so generated data must stay in test environments.

    How to use this tool

    1. Choose the National ID option

      The tool is pinned to the 10-digit Saudi National ID / Iqama format with the Luhn check digit.

    2. Generate a value

      Click Generate to create one number starting with 1 or 2 and ending in a valid Luhn check digit.

    3. Validate or copy

      Switch to Validate to see the citizen or resident label and the expected check digit, or copy the result as .txt.

    Use cases

    Citizen and resident fixtures

    Seed Saudi onboarding forms with values for both the 1 and the 2 prefix.

    Checksum regression tests

    Compare your Luhn implementation against 1000000008 and 2000000006.

    Prefix branching

    Test that your form treats leading 1 and leading 2 records differently.

    Saudi ID rules

    PartRule
    Length10 digits
    First digit1 = citizen National ID, 2 = Iqama (resident foreign national)
    Digits 2-9Body digits
    Digit 10Luhn check digit
    StatusCommunity-documented, not officially published

    The Luhn rule matches common validators; government systems do not publish an algorithm.

    Common mistakes

    Mistake:Assuming the algorithm is official

    Fix:The Luhn check and 1/2 prefix are community-documented; do not treat them as a published specification.

    Mistake:Using an Iqama where a citizen ID is required

    Fix:Both are 10 digits, so check the leading digit rather than only the length.

    Mistake:Expecting a generated value to be unassigned

    Fix:The structure is real, so a random value can coincide with an issued number; keep it in test data.

    Frequently asked questions

    Are these real Saudi National IDs or Iqamas?

    No. They are synthetic values for QA and development, never for real applications, KYC checks, tax filings, or identity documents. A valid-looking value can coincide with a real ID; DevTools accepts no liability for how generated data is used.

    What is the difference between a National ID and an Iqama?

    Both are 10 digits, but citizen National IDs start with 1 and Iqama numbers for resident foreign nationals start with 2.

    Is the Luhn check officially documented?

    No. The 10th-digit Luhn rule and the 1/2 prefix are community-documented rather than an official published algorithm, so treat them as a widely used convention.

    How is the check digit calculated?

    It is the standard Luhn check digit computed over the first nine digits, and the validator reports the expected digit when a pasted value fails.

    Is the Saudi VAT number the same as the National ID?

    No. The 15-digit VAT number is a separate ZATCA identifier, and it has its own tool on this site.