웹 개발
Credit Card Validator
Luhn 알고리즘으로 카드 번호를 검증하고 결제 네트워크와 자릿수를 확인합니다. 모든 계산은 브라우저에서 이루어지며, 번호는 어디로도 전송되지 않습니다.
The Luhn algorithm is a checksum most payment networks append to a card number to catch accidental typing errors (one transposed or mistyped digit). This tool checks a number against Luhn and identifies the payment network from its prefix (BIN).
How to use it
- Enter a card number — the Luhn check and network detection happen instantly as you type.
- Spaces and hyphens in the number are ignored automatically, so you don't need to strip them yourself.
- The tool shows the expected length for the detected network, so you can immediately see if digits are missing.
Common uses
- Validating a payment form on the frontend before submission — a basic sanity check before hitting the payment gateway.
- Generating test card numbers for development and QA (with a correct checksum, but not tied to real accounts).
- Quickly checking whether a manually entered number is just a typo-riddled string of random digits.
Things to keep in mind
A card passing the Luhn check doesn't mean it's active, unblocked, or even real — the check only catches obvious typing mistakes.
Card data is processed entirely in your browser and never sent anywhere, but for actual payments, always use a certified payment form (PCI DSS) rather than pasting a real card number into a third-party tool.
자주 묻는 질문
검사를 통과하면 카드가 실제이고 잔액이 있다는 뜻인가요?
아니요 — 이 도구는 감지된 네트워크에 대한 Luhn 체크섬과 예상 자릿수만 확인합니다. 카드가 실제로 존재하는지, 활성 상태인지, 잔액이 있는지는 카드 발급사에 문의해야 하므로 알 수 없습니다.
Luhn 알고리즘은 어떻게 작동하나요?
오른쪽부터 매 두 번째 자릿수를 두 배로 하고, 결과의 자릿수를 변경되지 않은 자릿수와 함께 합산한 후, 합계가 10의 배수인지 확인합니다 — 대부분의 오타와 자릿수 전치를 잡아내지만 사기 검사는 아닙니다.
제 카드 번호가 어딘가로 전송되나요?
아니요, 검증은 전적으로 브라우저 내에서 이루어지며 번호는 절대 전송되거나 저장되지 않습니다.
카드 번호로 결제 네트워크(Visa, Mastercard 등)를 어떻게 판별하나요?
BIN(Bank Identification Number)이라 불리는 번호 앞 몇 자리로 판별합니다 — 예를 들어 Visa 번호는 항상 4로 시작하고, Mastercard는 51~55 또는 2221~2720 범위로 시작합니다. 결제 폼은 이 접두어를 이용해 번호 입력을 마치기도 전에 네트워크 아이콘을 결정합니다.
BIN으로 어떤 은행이 카드를 발급했는지 알 수 있나요?
부분적으로 가능합니다 — 앞 6자리(확장 BIN)로 결제 네트워크뿐 아니라 구체적인 발급 은행과 카드 종류(체크카드 또는 신용카드)까지 대체로 파악할 수 있지만, 은행을 정확히 특정하려면 Luhn 알고리즘 자체가 아니라 전문 BIN 조회 데이터베이스가 필요합니다.