💳 Credit Card Number Validator
Check a card number's length, brand (IIN/BIN prefix) and Luhn check digit locally in the browser; this is an offline format check only and cannot verify whether the card exists, is activated, or can pay; the number is not uploaded.
請在上方輸入卡號以開始校驗
📖 卡組織 BIN 字首對照表
| 卡組織 | BIN 字首 | 長度 | 說明 |
|---|---|---|---|
| Visa | 4 | 13/16/19 | 以 4 開頭 |
| Mastercard | 51-55, 2221-2720 | 16 | 5 段及 2 系列 |
| American Express | 34, 37 | 15 | 以 34/37 開頭 |
| UnionPay(銀聯) | 62, 88 | 16-19 | 以 62 開頭為主 |
| JCB | 3528-3589 | 16-19 | 35 開頭 |
| Discover | 6011, 65, 644-649 | 16-19 | 多字首 |
| Diners Club | 300-305, 36, 38 | 14-19 | 國際卡 |
| Maestro | 50, 56-58, 6 | 12-19 | 簽帳金融卡 |
| MIR | 2200-2204 | 16-19 | 俄羅斯 |
💡 Luhn 演算法說明
Luhn 演算法(又稱"模 10"演算法)由 IBM 科學家 Hans Peter Luhn 於 1954 年提出,用於校驗信用卡號、IMEI、加拿大社保號等。
步驟:
1. 從右往左,將偶數位(第 2、4、6…位)的數字乘以 2;
2. 若乘積為兩位數,將兩位數相加(或減 9);
3. 將所有數字相加;
4. 若總和能被 10 整除,則校驗通過。
📚 深度解析:信用卡號驗證器
💡 常見使用場景
- 校驗銀行卡號是否通過 Luhn 校驗位
- 支付或登錄檔單提交前的卡號格式初檢
- 識別手輸卡號的單字元筆誤與相鄰換位錯誤
❓ 常見問題(FAQ)
- Luhn 能檢出哪些錯誤?
- 能檢出所有單數字錯誤和約 90% 的相鄰數字換位錯誤;但無法識別故意構造的合規假號。
- 通過 Luhn 就是有效卡號嗎?
- 不是。Luhn 只驗證校驗位,卡號是否真實、可否授權須由髮卡行與支付閘道器確認。
- 會影響卡號安全嗎?
- 不會。卡號只在瀏覽器本地計算,不上傳、不儲存。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Card validation | Luhn check + IIN range detection | ISO/IEC 7812 card numbering |
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準