// Remove spaces and dashes let cleaned = rawSerial.replace(/[\s-]/g, ''); if (!isValidSerialFormat(cleaned)) resultDiv.style.display = 'block'; resultDiv.className = 'result error'; resultDiv.innerHTML = '❌ Invalid format. iPhone serial numbers are 12 alphanumeric characters (excluding I, O, U).<br><br>Example: <strong>F17LJ1D2XXXX</strong>'; return;
It validates the format and decodes model, color, storage, and manufacturing info from the serial number. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>iPhone Serial Number Checker</title> <style> body font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; max-width: 600px; margin: 2rem auto; padding: 1rem; background: #f5f5f7; .card background: white; border-radius: 1.5rem; padding: 1.5rem; box-shadow: 0 8px 20px rgba(0,0,0,0.05); h1 font-size: 1.8rem; margin-top: 0; color: #1c1c1e; label font-weight: 500; display: block; margin-bottom: 0.5rem; input width: 100%; padding: 0.8rem; font-size: 1rem; border: 1px solid #c6c6c8; border-radius: 0.75rem; box-sizing: border-box; font-family: monospace; button margin-top: 1rem; background: #007aff; color: white; border: none; padding: 0.7rem 1.5rem; font-size: 1rem; border-radius: 2rem; cursor: pointer; font-weight: 500; button:hover background: #005fc1; .result margin-top: 1.5rem; padding: 1rem; background: #f2f2f6; border-radius: 1rem; font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; .error color: #d70015; background: #ffe6e8; .info color: #1c1c1e; hr margin: 1rem 0; border: none; border-top: 1px solid #e5e5ea; .note font-size: 0.8rem; color: #6c6c70; margin-top: 1rem; </style> </head> <body> <div class="card"> <h1>📱 iPhone Serial Number Checker</h1> <p>Enter an iPhone serial number to validate format and see basic decoded info.</p> <label for="serial">Serial Number</label> <input type="text" id="serial" placeholder="e.g., F17LJ1D2XXXX" autocomplete="off"> <button id="checkBtn">Check Serial</button>
// Decode basic info (production year/week, factory, model family guess) function decodeSerialInfo(serial) iphone serial number checker
if (!rawSerial) resultDiv.style.display = 'block'; resultDiv.className = 'result error'; resultDiv.innerHTML = '❌ Please enter an iPhone serial number.'; return;
<script> (function() // Helper: validate iPhone serial number format (12 characters, alphanumeric, no I/O/U) function isValidSerialFormat(serial) // Remove spaces and dashes let cleaned = rawSerial
const decoded = decodeSerialInfo(cleaned); if (!decoded) resultDiv.style.display = 'block'; resultDiv.className = 'result error'; resultDiv.innerHTML = '❌ Could not decode this serial.'; return;
function displayResult() const inputField = document.getElementById('serial'); let rawSerial = inputField.value.trim(); const resultDiv = document.getElementById('result'); Production:</strong> Week $decoded
// Build nice output resultDiv.style.display = 'block'; resultDiv.className = 'result info'; resultDiv.innerHTML = ` <strong>✅ Valid iPhone Serial</strong><br><br> <strong>🔢 Serial:</strong> $decoded.fullSerial<br> <strong>🏭 Factory:</strong> $decoded.factory<br> <strong>📅 Approx. Production:</strong> Week $decoded.week, $decoded.year<br> <strong>🔍 Model segment:</strong> $decoded.modelHint<br> <hr> <small>📌 <strong>Note:</strong> This is format + basic decoding. For exact model, warranty, or replacement check, visit <a href="https://checkcoverage.apple.com" target="_blank">Apple Check Coverage</a>.</small> `;