Generate algorithmically valid Turkish national identification numbers (TCKN) for use as test data, and validate numbers you already have. Everything runs in your browser — nothing is sent to a server.

These numbers do not belong to real people. They satisfy the public checksum rules of the TCKN format and are intended for software testing, database seeding, demos and education only. Using them to impersonate a person or to interact with real government or financial services is illegal.

Generated TCKN
Validate a TCKN

What is a TCKN?

TCKN stands for Türkiye Cumhuriyeti Kimlik Numarası — the Turkish Republic Identification Number. It is an 11-digit number assigned to every Turkish citizen, and it appears in almost every Turkish software system: e-commerce checkouts, banking onboarding, insurance forms, health records and government services.

If you are building or testing an application for the Turkish market, you will sooner or later need a field that accepts a TCKN — and you will need valid values to test it with. That is what this page is for.

TCKN format rules

A number is a structurally valid TCKN when all of the following hold:

  1. It is exactly 11 digits long.
  2. The first digit is not 0.
  3. The 10th digit is a check digit: d10 = ((d1+d3+d5+d7+d9) × 7 − (d2+d4+d6+d8)) mod 10
  4. The 11th digit is a check digit: d11 = (d1+d2+…+d10) mod 10

The first nine digits carry no decodable meaning — a common misconception is that they encode the province or year of birth. They do not. Only digits 10 and 11 are derived, and they exist so that a single typo in a form can be caught instantly without a database lookup.

Worked example

Take 12345678950:

StepCalculationResult
Odd-position digits (1st, 3rd, 5th, 7th, 9th)1 + 3 + 5 + 7 + 925
Even-position digits (2nd, 4th, 6th, 8th)2 + 4 + 6 + 820
10th digit(25 × 7 − 20) mod 10 = 155 mod 105
Sum of first ten digits1+2+3+4+5+6+7+8+9+550
11th digit50 mod 100

Both check digits match, so 12345678950 is algorithmically valid.

More valid examples you can copy into your fixtures: 62601815964, 18301661332, 28609139020, 70308246202.

Validate a TCKN in code

JavaScript

function isValidTCKN(value) {
  if (!/^[1-9][0-9]{10}$/.test(value)) return false;
  const d = [...value].map(Number);
  const odd  = d[0] + d[2] + d[4] + d[6] + d[8];
  const even = d[1] + d[3] + d[5] + d[7];
  if ((odd * 7 - even) % 10 !== d[9]) return false;
  const sum = d.slice(0, 10).reduce((a, b) => a + b, 0);
  return sum % 10 === d[10];
}

Python

import re

def is_valid_tckn(value: str) -> bool:
    if not re.fullmatch(r"[1-9][0-9]{10}", value):
        return False
    d = [int(c) for c in value]
    if (sum(d[0:9:2]) * 7 - sum(d[1:8:2])) % 10 != d[9]:
        return False
    return sum(d[:10]) % 10 == d[10]

PHP

function isValidTckn(string $value): bool {
    if (!preg_match('/^[1-9][0-9]{10}$/', $value)) return false;
    $d = array_map('intval', str_split($value));
    $odd  = $d[0] + $d[2] + $d[4] + $d[6] + $d[8];
    $even = $d[1] + $d[3] + $d[5] + $d[7];
    if (($odd * 7 - $even) % 10 !== $d[9]) return false;
    return array_sum(array_slice($d, 0, 10)) % 10 === $d[10];
}

Java

public static boolean isValidTckn(String value) {
    if (value == null || !value.matches("[1-9][0-9]{10}")) return false;
    int[] d = value.chars().map(c -> c - '0').toArray();
    int odd  = d[0] + d[2] + d[4] + d[6] + d[8];
    int even = d[1] + d[3] + d[5] + d[7];
    if ((odd * 7 - even) % 10 != d[9]) return false;
    int sum = 0;
    for (int i = 0; i < 10; i++) sum += d[i];
    return sum % 10 == d[10];
}

Go

func IsValidTCKN(value string) bool {
    if len(value) != 11 || value[0] == '0' {
        return false
    }
    d := make([]int, 11)
    for i, c := range value {
        if c < '0' || c > '9' {
            return false
        }
        d[i] = int(c - '0')
    }
    odd := d[0] + d[2] + d[4] + d[6] + d[8]
    even := d[1] + d[3] + d[5] + d[7]
    if (odd*7-even)%10 != d[9] {
        return false
    }
    sum := 0
    for i := 0; i < 10; i++ {
        sum += d[i]
    }
    return sum%10 == d[10]
}

Why not use a real person’s number for testing?

Turkey’s personal data protection law, KVKK (Law No. 6698), treats a TCKN as personal data. Putting real identification numbers into test databases, staging environments, CI fixtures or demo screenshots creates genuine legal exposure — and those environments are typically far less protected than production.

Generated numbers solve this cleanly. They exercise the same validation logic, the same field lengths and the same database constraints, without any real person’s data ever entering a non-production system.

Typical uses:

  • Form validation tests — confirm your checksum logic rejects bad input
  • Database seeding — fill staging tables with realistic-looking records
  • API and integration tests — send well-formed payloads to your endpoints
  • Demos and screenshots — show realistic data to clients safely
  • Teaching — demonstrate check-digit algorithms with a real-world example

Important limitations

  • A generated number is valid in format only. It is not registered to anyone, and it will not pass a real identity check against Turkey’s central population registry (NVİ).
  • This tool performs an offline checksum calculation. It does not query any government system, and it cannot tell you whether a number is actually issued or who it belongs to.
  • Because the checksum space is small, a generated number could coincidentally match a real citizen’s number. Never present a generated number as belonging to a real person.

Frequently asked questions

Is the TCKN the same as a Turkish tax number? No. The tax identification number (Vergi Kimlik Numarası, VKN) is a separate 10-digit number used for businesses and taxpayers. Individuals often use their TCKN in place of a VKN, but the formats and check rules differ.

Can a TCKN start with 0? No. The first digit is always 1–9, which is why a regular expression for the format is ^[1-9][0-9]{10}$.

Is a regex enough to validate a TCKN? No. A regex only confirms the length and the leading digit. You must also verify both check digits — see the code samples above.

Are these numbers free to use? Yes. The tool is free, requires no registration, and runs entirely client-side.

Turkish-language resources

This site is primarily in Turkish. If you read Turkish, these pages go deeper: