← All guides

How Turkish ID numbers are validated: the algorithm, an example and its limits

· 3 min read

A Turkish ID number (TC Kimlik No) is not a random number. The last two digits are calculated from the earlier ones, so a typing mistake can often be spotted from the number itself. But this check does not show that the number belongs to a real person.

The structure of the number

A TC Kimlik No has 11 digits and follows these rules:

How digit 10 is calculated

Number the digits 1 to 9 from left to right. Add up the digits in odd positions (1, 3, 5, 7, 9) and multiply the sum by 7, then subtract the sum of the digits in even positions (2, 4, 6, 8). The remainder after dividing by 10 is digit 10.

digit 10 = ((d1 + d3 + d5 + d7 + d9) × 7 − (d2 + d4 + d6 + d8)) mod 10

How digit 11 is calculated

The last digit of the sum of the first 10 digits must be digit 11.

digit 11 = (d1 + d2 + ... + d10) mod 10

A worked example

Take 10000000146, a number commonly used for testing.

digits         : 1 0 0 0 0 0 0 0 1 4 6
odd positions  : 1 + 0 + 0 + 0 + 1 = 2   → 2 × 7 = 14
even positions : 0 + 0 + 0 + 0     = 0
digit 10       : (14 − 0) mod 10 = 4     ✓ (the number has 4)
sum of first 10: 1 + 0×7 + 1 + 4  = 6
digit 11       : 6 mod 10 = 6            ✓ (the number has 6)

This is a test example. We do not claim it belongs to a real person.

What this check does not show

A number that follows the rules may belong to no one. Equally, the number of a real person fails this check if it was typed wrongly. So this is only a typo filter.

To confirm that a number is actually registered, the authorised body's identity verification service is used. It asks for extra details such as name, surname and year of birth, and it is open only to authorised parties.

Try it yourself

Type a number into the TC Kimlik No validator. The 11-digit, first-digit, digit 10 and digit 11 rules are shown one by one, and the expected digit is shown for any rule that fails. Your number never leaves your browser.

This article is general information. Collecting or using other people's ID numbers without permission can cause legal problems.

More guides