이란 국가 코드 검증기 (코드 Melli, کد ملی)

마지막 숫자를 확인하고 유효한 것을 확인하기 위해 하나 이상의 10자리 국가 코드를 붙여주세요.

브라우저에서 실행됩니다. 파일은 기기 밖으로 나가지 않습니다. 확인하는 방법 보기

…

사용 방법

  1. 1
    코드를 붙여

    각 줄에 국가 코드 하나씩 넣으세요.

  2. 2
    확인해

    각 선은 청소되고, 포장되어 검사됩니다.

  3. 3
    그 이유 들 을 읽어 보십시오

    왜 실패한 라인이 실패했는지 알아보세요.

  4. 4
    테스트 코드를 만들자

    양식을 테스트하기 위해 유효한 무작위 코드를 생성합니다.

  5. 5
    리스트를 내보낼 수 있습니다

    암호를 복사하거나 결과를 다운로드하세요.

이 도구 소개

Every Iranian citizen has a 10-digit national code, code melli, printed on the national ID card and the birth certificate. Banks, the tax administration, universities, insurers and online shops ask for it, and it is the key to almost every e-government service. The first three digits are the code of the registration office that issued it, the next six are a serial number and the tenth digit is a check digit that catches most typing mistakes. This validator applies the check digit rule to one code or a whole list, reads Persian and Arabic digits, puts back leading zeros that spreadsheets often drop, and rejects codes made of one repeated digit such as 1111111111, which pass the formula but are not issued.

Who this is for

Developers and data teams building forms and imports for Iranian users, HR and payroll staff cleaning employee lists, and anyone who wants to check a code before submitting a form.

The check digit rule

1. Take the first nine digits. 2. Multiply them by 10, 9, 8, 7, 6, 5, 4, 3 and 2 in turn, and add the results. 3. Find the remainder of the sum divided by 11. 4. If the remainder is less than 2, the check digit equals the remainder. Otherwise it is 11 minus the remainder. 5. The tenth digit of the code must equal this check digit.

Leading zeros

Many codes start with 0 or 00, for example codes issued in Tehran. Spreadsheets store them as numbers and drop the zeros, so 0084575948 becomes 84575948. The validator pads an 8 or 9-digit number back to 10 digits before checking.

Persian digits

Codes copied from Persian documents use Persian digits (۰۱۲۳۴۵۶۷۸۹) or Arabic-Indic digits (٠١٢٣٤٥٦٧٨٩). They are converted to Latin digits first, so ۰۰۸۴۵۷۵۹۴۸ is read as 0084575948.

Batch checking

Paste one code per line, up to thousands, and the results show which lines pass and why the others fail: wrong length, a repeated digit, or a wrong check digit. Copy the valid ones or export the list.

Worked example

For 0084575948 the weighted sum of the first nine digits is 0×10 + 0×9 + 8×8 + 4×7 + 5×6 + 7×5 + 5×4 + 9×3 + 4×2 = 212. 212 mod 11 is 3, and 11 − 3 = 8, which matches the last digit, so the code passes. Changing the last digit to 9 makes it fail.

Test codes

The "make" button creates random codes that pass the check, for testing forms. They are not real people's codes.

Limits

A format check only. A code that passes is not proof that it belongs to a real person; only the civil registration office can confirm that.

풀이 예시

0084575948 passes: the weighted sum 212 leaves remainder 3, and 11 − 3 = 8.

한눈에 보기

자주 묻는 질문

코드 멜리는 몇 자리가 있을까요?

10개, 0으로 시작하는 코드에는 여전히 10자리가 있습니다.

마지막 숫자는 어떻게 계산되는가?

첫 9자리 10로 곱해서 2에 이릅니다. 합이 mod 11입니다.

왜 1111111111가 실패하는 걸까요?

한 자릿수를 반복해서 쓰는 코드들은 수식을 통과하지만 발급되지 않아서 거부됩니다.

페르시아 숫자를 붙여넣을 수 있나요?

네, 페르시아어와 아랍어가 자동으로 변환됩니다.

유효한 코드란 신원을 증명하는 건가요?

아니, 숫자가 잘 형성된 것 뿐이에요

코드 업로드 됐나요?

아니, 체크가 네 브라우저에서 실행됩니다.

완전 무료요금 없음, 가입 없음
파일은 비공개로 유지됩니다모든 작업이 브라우저 안에서 이루어집니다
내 언어로 쉽게여러 언어로 제공