<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TC Kimlik Kontrolü</title>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: #f8fafc;
}
.card {
background: #1e293b;
padding: 35px;
border-radius: 20px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
width: 100%;
max-width: 400px;
text-align: center;
border: 1px solid #334155;
}
h2 {
color: #f1f5f9;
margin-bottom: 25px;
font-size: 22px;
}
input {
width: 100%;
padding: 16px;
background: #0f172a;
border: 2px solid #334155;
border-radius: 10px;
font-size: 20px;
letter-spacing: 3px;
text-align: center;
outline: none;
color: #fff;
margin-bottom: 20px;
transition: all 0.3s ease;
}
input:focus {
border-color: #38bdf8;
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
button {
width: 100%;
background: #38bdf8;
color: #0f172a;
border: none;
padding: 16px;
border-radius: 10px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
transition: background 0.2s;
}
button:hover {
background: #0ea5e9;
}
#result {
margin-top: 20px;
padding: 14px;
border-radius: 10px;
font-weight: 600;
font-size: 16px;
display: none;
}
.success {
background-color: rgba(34, 197, 94, 0.15);
color: #4ade80;
border: 1px solid rgba(34, 197, 94, 0.3);
}
.error {
background-color: rgba(239, 68, 68, 0.15);
color: #f87171;
border: 1px solid rgba(239, 68, 68, 0.3);
}
</style>
</head>
<body>
<div class="card">
<h2>TC Kimlik Kontrolü</h2>
<input type="text" id="tcInput" maxlength="11" placeholder="___________" autocomplete="off">
<button onclick="checkAlgorithm()">Kontrol Et</button>
<div id="result"></div>
</div>
<script>
document.getElementById('tcInput').addEventListene r('input', function () {
this.value = this.value.replace(/[^0-9]/g, '');
});
function checkAlgorithm() {
const tc = document.getElementById('tcInput').value;
const resultDiv = document.getElementById('result');
resultDiv.style.display = "block";
if (tc.length !== 11 || tc[0] === '0') {
resultDiv.className = "error";
resultDiv.innerText = "❌ TC Kimlik Numarası Geçersiz!";
return;
}
const digits = tc.split('').map(Number);
const singleSum = digits[0] + digits[2] + digits[4] + digits[6] + digits[8];
const doubleSum = digits[1] + digits[3] + digits[5] + digits[7];
const checkDigit10 = ((singleSum * 7) - doubleSum) % 10;
if (digits[9] !== checkDigit10) {
resultDiv.className = "error";
resultDiv.innerText = "❌ TC Kimlik Numarası Geçersiz!";
return;
}
let totalSum = 0;
for (let i = 0; i < 10; i++) {
totalSum += digits[i];
}
const checkDigit11 = totalSum % 10;
if (digits[10] !== checkDigit11) {
resultDiv.className = "error";
resultDiv.innerText = "❌ TC Kimlik Numarası Geçersiz!";
return;
}
resultDiv.className = "success";
resultDiv.innerText = "✅ TC Kimlik Numarası Geçerli.";
}
</script>
</body>
</html>
Html TC doğrulama kodu
4
●340
- 06-07-2026, 18:52:28
- 06-07-2026, 18:57:53Rica ederim, güle güle kullanın.Haritayorumu adlı üyeden alıntı: mesajı görüntüle
- 08-07-2026, 23:43:28basit java algoritması nvi mi kaldı artık. saçma sapan sağdan soldan çekmeye çalışsan 2022 dataları var.wehwet adlı üyeden alıntı: mesajı görüntüle