loot.tools

Credit Card Validator

Paste a card number to see whether it passes the Luhn checksum, which network issued it (Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay, or Maestro), and whether the length lines up with that network. It also generates fake but Luhn-valid numbers for each network so you can fill out and test a checkout form without a real card. Everything runs in your browser - no number is sent anywhere or stored.

Check whether a card number passes the Luhn checksum and which network it belongs to. It all runs in your browser - nothing is sent anywhere or saved. Don't paste a real card you care about.

Generate a test number

Build a fake but Luhn-valid number for filling out and testing payment forms. It maps to no real account.

What the Luhn check does

The Luhn algorithm is a simple checksum that catches most single-digit typos and transposed digits in a card number. Starting from the right, every second digit is doubled (subtracting 9 when the result goes over 9), all the digits are summed, and a valid number's total is divisible by 10. Passing the check doesn't mean the card exists or has funds - it only means the number is well-formed. It's the same test a payment form runs before it ever talks to a bank.

How the network is detected

Each network owns a range of leading digits, called the IIN or BIN. Visa numbers start with 4, American Express with 34 or 37, Mastercard with 51-55 or 2221-2720, and so on. The tool matches the number's prefix against the published ranges, then checks the total length against what that network allows. Because some ranges overlap, the more specific ones are checked first.

About the test numbers

The generator builds numbers that start with a real network prefix and end with a correct Luhn check digit, so they look valid to a form's front-end validation. They're random in the middle and map to no real account, which makes them handy for testing sign-up and checkout flows. They are not the same as a payment processor's sandbox cards, which only work inside that processor's test mode.