# Turkish Identity Number Validator

> A small C# validator that checks Turkish identity-number check digits directly on a long, without regex, substring extraction or character-array materialization.

- Author: Muhammet Ali Köker
- Language: en
- Canonical: https://alikoker.com.tr/en/turkish-identity-number-validator-csharp
- Translation: https://alikoker.com.tr/turkish-identity-number-validator-csharp
- Published: 2026-06-15T12:00:00+03:00
- Modified: 2026-08-27T10:36:29+03:00
- Verified: 2026-08-27T10:36:29+03:00
- Type: project

This component answers one narrow question: does the number satisfy the published arithmetic check-digit rules? Its core API operates on a `long`; digits are extracted with division and modulo, and the final two checks are computed numerically. Regex, substring slicing and character-array parsing are not part of the validation path.

The word “valid” must not be stretched beyond that contract. Passing the checksum does not prove that a number was issued to a real person, nor that the person presenting it owns the identifier. The library does not query a population registry or any government endpoint. Arithmetic pre-validation and official identity verification remain separate operations.

That makes the code useful as an inexpensive first gate before a more authoritative process, while keeping data-handling policy outside the utility. Systems processing real identity data still have their own privacy, authorization, logging and minimization obligations.

Context article: [Identity Numbers from a Digital Forensics Perspective](/en/identity-numbers-from-a-digital-forensics-perspective)  
Repository: [GitHub](https://github.com/alikoker/turkish-identity-number-validator-csharp)  
Zenodo record: [Zenodo](https://zenodo.org/records/22117411)  
DOI: [DOI](https://doi.org/10.5281/zenodo.22117411)

## Cite This Work

Köker, M. A. (2026). Turkish Identity Number Validator. alikoker.com.tr. https://alikoker.com.tr/en/turkish-identity-number-validator-csharp

- BibTeX: https://alikoker.com.tr/en/turkish-identity-number-validator-csharp.bib
- RIS: https://alikoker.com.tr/en/turkish-identity-number-validator-csharp.ris
- CSL-JSON: https://alikoker.com.tr/en/turkish-identity-number-validator-csharp.csl.json
