Turkish ID Number (T.C. Kimlik No) Check Digits: How the Algorithm Works

Last updated: · 8 min read

The Turkish national identification number (T.C. Kimlik No, often abbreviated TCKN) has 11 digits, and the last two are check digits calculated from the ones before them. This lets a form catch single-digit typing errors without asking a server. Turkey's civil registry authority, NVI, states that the number has 11 digits and that the last two are a verification number computed from the first nine by an algorithm. This guide walks through the check-digit rule that is widely known among software developers, explains what the check does and does not show, and points out that real identity verification is only possible through the official service. The example uses only 10000000146, the sample number found in documentation; the values are real output from the Turkish ID Number Validator.

Formula

Let the digits be d1 … d11 from left to right.

1. The number has 11 digits and d1 ≠ 0
2. odd  = d1 + d3 + d5 + d7 + d9
   even = d2 + d4 + d6 + d8
3. d10 = (odd × 7 − even) mod 10
4. d11 = (d1 + d2 + … + d10) mod 10

mod 10: the remainder after division by 10 (a result from 0 to 9; add 10 if it comes out negative)

The rule has two steps. First, the digits in odd positions among the first nine (1st, 3rd, 5th, 7th and 9th) are added and multiplied by 7, and the sum of the digits in even positions (2nd, 4th, 6th and 8th) is subtracted; the last digit of the result is the 10th digit. Then the last digit of the sum of the first ten digits gives the 11th. Since the 11th digit depends on the 10th, which in turn depends on the first nine, the last two digits are fully determined by the first nine. NVI's official pages say that the verification number is computed by an algorithm; the formula itself does not appear on the official pages we consulted. The rule given here is the publicly known one used throughout software, and it has not been published as a formal standard. The tool performs this check and nothing else: it compares the 10th and 11th digits you entered with the computed ones. It does not generate numbers and does not look anything up in any register.

What the inputs mean

Turkish ID number
11 digits. Spaces are removed; if anything other than a digit is present, the tool warns you without calculating. Enter only your own number or that of someone who has given you clear consent; for trying the tool out, the default sample number (10000000146) is all you need.

Worked example: Working out the check digits of the sample number 10000000146

  1. Input: 10000000146. The digits are 1, 0, 0, 0, 0, 0, 0, 0, 1, 4 and 6. The first digit is not zero and there are 11 digits in all.
  2. Digits in odd positions (1st, 3rd, 5th, 7th, 9th): 1 + 0 + 0 + 0 + 1 = 2. Digits in even positions (2nd, 4th, 6th, 8th): 0 + 0 + 0 + 0 = 0.
  3. 10th digit: (2 × 7 − 0) mod 10 = 14 mod 10 = 4. The 10th digit of the number is 4 as well.
  4. 11th digit: the first ten digits add up to 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 4 = 6, and 6 mod 10 = 6. The 11th digit of the number is 6 as well.
  5. The tool's output: Turkish ID number format check: valid ✓ (both check digits match), followed by 10th digit (computed from the first 9 digits): 4 and 11th digit (computed from the first 10 digits): 6
  6. The output always ends with this reminder: Note: only the mathematical format is checked; this does not tell whether the number belongs to a real person (that is only possible through the official NVİ / e-Devlet identity verification service). The number is processed in your browser; it is not stored or sent anywhere.
  7. Try a single-digit error by changing the last digit to 7 (10000000147). The tool shows Turkish ID number format check: invalid ✗ and Reason: The 11th digit does not match (computed 6, entered 7).
  8. Leave one digit out (1000000014). In that case the check digits are not calculated at all: Reason: It must have 11 digits; you entered 10.
  9. If a character that is not a digit is entered (1000000014a), the tool shows this message instead of a result: Enter digits only: a Turkish ID number (T.C. Kimlik No) has 11 digits.

Result: 10000000146 → Turkish ID number format check: valid ✓ (both check digits match). This only shows that the digits satisfy the rule; it does not show that the number belongs to anyone.

🪪 Turkish ID Number Validator (T.C. Kimlik)

Free, no sign-up; your data stays in your browser.

Open the calculator →

How to read the result

A check digit is a typing check, not an identity check. Hundreds of millions of digit strings satisfy the rule and not all of them have been issued to someone, so a result of "valid" does not prove that a number is real, that it belongs to a particular person, or that this person is the one in front of you. NVI notes that the algorithm is shared with other public bodies so that they can check the correctness of numbers; in other words, its purpose is to catch typing and record-keeping errors. Whether a number is actually registered together with a given name, surname and year of birth can only be established through NVI's official identity verification service and the services offered on the e-Devlet portal. The right place for a format check is a form: warning the user straight away about a mistyped digit and sparing the server pointless lookups. Under the Turkish Population Services Law (No. 5490, Article 46), the number is issued to a person once and cannot be changed, so the consequences of it leaking are permanent. Do not enter other people's numbers into websites, and share your own only where it is truly required and you trust the recipient. This article is general information, not legal advice.

Common mistakes

  • Treating a "valid" result as identity verification. A format check does not show that the number belongs to someone or that the person presenting it is that person; that takes the official verification service.
  • Mixing up odd and even positions. Counting starts from the left at 1: the sum multiplied by 7 is that of the 1st, 3rd, 5th, 7th and 9th digits. In programming languages that index arrays from 0, those are indices 0, 2, 4, 6 and 8.
  • Getting the remainder of a negative number wrong. When the even digits add up to more, (odd × 7 − even) can be negative, and in languages such as JavaScript and C the % operator then returns a negative remainder. Add 10 and take mod 10 again.
  • Storing the number in a numeric type. Eleven digits do not fit into a 32-bit integer and no arithmetic is ever done on the number; store it as text and check that it contains digits only.
  • Not checking that the first digit is non-zero. A string that starts with zero is not in a valid format even if both check digits match.
  • Using real people's numbers as test data. Development and test environments should only use values known to belong to nobody, such as the sample number from documentation.
  • Writing the number to log files, URLs or error messages. A number that can never be changed cannot be taken back once it leaks this way; mask it in logs.

Frequently asked questions

What is the algorithm for the Turkish ID number?

Add the digits in odd positions among the first nine, multiply by 7 and subtract the sum of the digits in even positions; the remainder after division by 10 is the 10th digit. The remainder after dividing the sum of the first ten digits by 10 is the 11th. In addition, the number must have 11 digits and must not start with zero.

Does every number that passes the algorithm belong to a real person?

No. The rule only shows that the last two digits are consistent with the ones before them. Not every string that satisfies it is a number issued to someone. Whether a number is actually registered can only be established through the official verification service.

Where is a Turkish ID number really verified?

Through NVI's T.C. Kimlik No verification service at tckimlik.nvi.gov.tr and the related services on the e-Devlet portal. These compare the number with the population register together with details such as name, surname and year of birth. For institutions there is also NVI's identity sharing system (KPS).

Does this tool generate Turkish ID numbers?

No. It only checks the format of the 11 digits you enter and shows the two computed check digits; it does not generate or complete numbers and does not search any register.

Can you tell a person's age or place of birth from the number?

No. According to NVI, the number is an 11-digit figure that contains no information; it does not carry meaningful details such as who the person is, their sex, age or place of birth.

Is this check enough for my form?

For catching typos, yes; for verifying identity, no. Repeat the client-side check on the server, do not ask for the number unless you really need it, and use the official service for any process where identity has to be verified.

Is the number I enter stored or sent anywhere?

No. The calculation is done by JavaScript on the page, in your browser; the number is not stored and is not sent to any server. It is still good practice never to enter someone else's number into any website.

The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.

Sources

Choose your cookie preference to continue

Records the site needs to work (theme, language, favourites) stay in your browser.

This site is free and funded by ads.

With your consent, Google Analytics cookies measure visits and Google AdSense cookies are used to show ads; the data is processed on Google servers abroad.

If you reject, the site works just the same.

Cookie Policy · KVKK notice