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
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates 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).
Examples
Citizen National ID
1000000008Valid — starts with 1 (citizen), Luhn check digit 8The leading 1 marks a citizen record; the final 8 satisfies the Luhn check.
Iqama number
2000000006Valid — starts with 2 (Iqama), Luhn check digit 6Resident foreign nationals are represented by the 2 prefix, and the checksum differs accordingly.
Wrong check digit
1000000009Invalid — 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
Choose the National ID option
The tool is pinned to the 10-digit Saudi National ID / Iqama format with the Luhn check digit.
Generate a value
Click Generate to create one number starting with 1 or 2 and ending in a valid Luhn check digit.
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
| Part | Rule |
|---|---|
| Length | 10 digits |
| First digit | 1 = citizen National ID, 2 = Iqama (resident foreign national) |
| Digits 2-9 | Body digits |
| Digit 10 | Luhn check digit |
| Status | Community-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.
Related tools
Saudi VAT Number Generator
Generate synthetic 15-digit ZATCA VAT registration numbers that start and end with 3, and validate pasted values.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
Tax Number Generator
Generate valid tax identification numbers for testing (TR, US, SG, etc.)
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.