Home🇮🇷 IranNational Code

National Code generator (Iran)

An Iranian national code (kod-e melli) is ten digits with a MOD-11 check digit. These test values are synthetic but checksum-valid.

Synthetic · not collision-guaranteed Validate a number →
605-992674-6

Synthetic national code with a valid check digit. Not a real issued number.

Format specification

IdentifierNational Code (کد ملی)
Country🇮🇷 Iran
Format000-000000-0
Length10 characters
ChecksumMOD 11
Example729-136335-7
Safe strategy Synthetic
Data qualityVerified against sources

National Code: what each part means

000 Prefix historically identifying the office where the number was issued.
000000 Six-digit serial number.
0 Check digit: the first nine digits weighted 10 down to 2, r = sum mod 11; the check is r when r < 2, otherwise 11 − r.

Validation regex

Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()

^\d{10}$

References

  1. en.wikipedia.org/wiki/National_identification_number#Iran

Common questions

Will these pass my validation?

Yes — they are well-formed National Code values (000-000000-0) and pass standard format checks, including the MOD 11 checksum.

Could one belong to a real person?

These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.

Can I generate many at once?

Increase the count, or use the free API and CSV/JSON export for large datasets.

Validate an existing number →

For software testing only. These numbers are synthetic and must never be used for real-world identification, applications, or to impersonate anyone.