How to use بررسی کد ملی
- 01Type the code10 digits; 8 or 9 get zeros.
- 02See the verdictCheck digit compared.
- 03Read the workingWeighted sum and remainder.

7731689956: the check digit matches.
The last digit of an Iranian national code is a check digit. Multiply the first nine digits by 10 down to 2, divide the sum by 11, and the remainder gives the last digit. The tool puts back lost leading zeros and shows the sum.
بررسی صحت کد ملی takes one weighted sum. The checker above does it for any 10-digit Iranian national code, accepts Persian digits and puts back the zeros at the start that spreadsheets and forms often drop.
The check digit rule
Example from ekhtebar.ir: for 773168995x the products add up to 313, and 313 divided by 11 leaves 5. That is 2 or more, so the last digit must be 11 − 5 = 6. The code 7731689956 passes; the same code ending in 1 doesn’t.
- Multiply the first nine digits by 10, 9, 8, 7, 6, 5, 4, 3 and 2.
- Add the nine results and divide the total by 11.
- If the remainder is 0 or 1, the last digit must equal the remainder.
- Otherwise the last digit must be 11 minus the remainder.
Leading zeros and what the tool leaves out
National codes starting with 0 are common, and they lose their zeros when typed into a number field. An 8- or 9-digit entry is filled with zeros in front before the check, as the Iranian guides recommend.
Many sites claim to show the city of issue from the first three digits. No official list of those codes is published, so this tool doesn’t guess.
At a glance
- Price
- Free. No sign-up, no watermark.
- Privacy
- Your text stays in your browser. Nothing is uploaded.
- Works in
- Chrome, Edge, Firefox and Safari, on phones and computers
Questions
الگوریتم کد ملی چیست؟
Multiply the first nine digits by 10, 9, 8, 7, 6, 5, 4, 3 and 2 and add the results. Divide by 11. If the remainder is 0 or 1, the last digit equals it; otherwise the last digit is 11 minus the remainder.
Does a valid result show the person or city?
No. It only means the digits follow the rule. The tool doesn’t contact the civil registration organisation (ثبت احوال), and it doesn’t guess a city from the first digits, because no official list of those codes is published.
Why does my code have only 8 or 9 digits?
Codes that start with 0 often lose their zeros in spreadsheets and forms. The tool adds them back in front before checking.
Is the number sent anywhere?
No. The check runs in your browser and nothing you type leaves your device.
Can it find the name of the person?
No. Only the civil registration organisation (ثبت احوال) holds that. The tool checks the digits and nothing else.