Validate Turkish ID Numbers
Turkish ID Validator
You can validate any Turkish ID number using the form below.
Note: The numbers entered to the form are not processed in the background in any other computer, all operations are done in your browser.
ID numbers in Turkey have an algorithm for input validation and other purposes. Algorithm is as follows:
- ID numbers consists of eleven digits.
- Tenth digit is calculated using the first nine digit.
- To calculate the tenth digit:
- Let A is the sum of 1st, 3rd, 5th, 7th and 9th digits. A = 1 + 3 + 5 + 7 + 9
- Let B is the sum of 2nd, 4th, 6th and 8th digits. B = 2 + 4 + 6 + 8
- Then tenth digit is the result of (7 * A - B) mod 10
- Eleventh digit is calculated using the first ten digits
- To calculate the eleventh digit:
- Let C is the sum of all digits until eleven
- Eleventh digit then becomes C mod 10
Download Code
You can find the code in Javascript and C language in the following addresses:
A little trivia
Turkish ID number system first started October 28, 2000 and the first number was given to Mustafa Kemal Atatürk, the founder of the Turkey Repoublic. The given number was 100000001, first nine digit odd number o if we calculate it right tenth digit becomes 4 and eleventh digit becomes 6 so Atatürk is given the number 10000000146.
Also, because it starts from 100000001 and the limit is 999999999, and there can only be 899999998 numbers. This means that around nine hundred million people can be mapped to a number at the same time although there are two countries in the world which have greater population than this number. If we count the dead people, according to a news article by Hürriyet in the year 2000, Turkey has given 120 million different numbers (70 million for the living, 50 million for dead people). And I currently don’t know what will be done when we reach the limit.
Also another fact about ID numbers is that it can’t end with an odd number.
And the possibility of randomly generated 11 digit number to be a valid one is 899999998 / 9000000000 which is nearly 1%.
That’s all folks.