فارسی

Iranian National Code Checker: Validate the Check Digit

Check a ten-digit Iranian national code, see the check digit and the weighted sum, or validate a whole pasted column at once.

Use this tool in your browser without installing software.

This tool checks only the structure and check digit; it says nothing about whether the code exists or who owns it.

About this tool

An Iranian national code has ten digits: the first nine identify the person and the last is a check digit. This tool recalculates that digit with a weighted sum, compares it with the last digit, and when a code fails it says whether the length, a non-digit character, a repeated pattern or the check digit is the problem. Codes whose ten digits are all the same are rejected even if the arithmetic happens to pass. Persian and Arabic digits, spaces, dashes and dots are accepted, so a code copied from Excel or a form still reads. The batch section checks up to 500 codes pasted with newlines or commas and lists the valid, invalid and repeated ones. Everything runs in the browser; no code is sent to a server.

How to use it

  1. 1

    Type or paste the ten-digit national code; the result updates as you type.

  2. 2

    If it fails, read the reason and the check digit the tool calculated.

  3. 3

    For a list, open the batch section and paste the codes.

If the answer looks wrong

  • My code looks right but the tool rejects it.

    Keep the leading zeros and make sure all ten digits were entered. If you copied from Excel, remove extra columns or hidden spaces.

  • The code has ten digits but the check digit is reported wrong.

    One digit is probably mistyped or swapped. Compare the calculated check digit with the last digit; if they differ, that input is not a valid code.

  • Every code in the list came back invalid.

    Other columns probably came along with the codes. Copy only the national-code column or separate the codes with newlines.

Frequently asked questions

How is the national code checked?

The first nine digits are multiplied by weights from 10 down to 2, the sum is divided by 11, and the remainder gives the check digit: if it is below 2 it is the digit itself, otherwise it is 11 minus the remainder. If the last digit differs, the code fails.

Why are codes like 1111111111 rejected?

When all ten digits are the same, the code is treated as a placeholder pattern. Some of these pass the arithmetic, but official systems do not accept them, so this tool applies the same rule.

Does a valid code mean the person is real?

No. The tool only checks the structure and check digit. It cannot tell whether the code exists in the civil registry or who it belongs to; identity checks need official systems.

Does it validate a company national ID too?

No. Legal-entity IDs have eleven digits and a different algorithm. This page is for the ten-digit personal code; an eleven-digit value is reported as the wrong length.

What are the batch limits?

Up to 500 codes per run. Separate them with newlines, commas, semicolons or tabs. Repeated codes are marked in the list but not removed, so every line keeps its place.

Are the codes stored or sent anywhere?

No. The check runs entirely in the browser, nothing is stored, and the tool works offline.