EzyTools

Card Number Validator (Luhn)

Check a card number's format with the Luhn algorithm and identify the network.

Loading…

Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.

About this tool

Every card number carries a final check digit that catches typing mistakes before they reach the bank. This tool runs the same Luhn algorithm payment gateways use and identifies the network from the prefix — including Saudi mada, which most foreign tools miss. Because card numbers are sensitive, the check runs inside your page and the number never leaves your device.

How to use

  1. 1Paste the card number — spaces and dashes do not matter.
  2. 2Read the result: the check digit is valid or it is not.
  3. 3Look at the network detected from the prefix.
  4. 4Fix a typo and paste again if the check fails.

When you need it

  • Confirming a card number before entering it in a payment form.
  • Producing format-valid test data for a billing system or shop.
  • Checking card numbers in a file before importing it into an accounting system.
  • Identifying the network to pick the right payment gateway.

Frequently asked questions

Does this check whether the card has funds?

No. It checks the format only, through the check digit. It cannot tell whether the card exists, is active or has a balance — only the issuing bank knows that.

Does it support Saudi mada cards?

Yes. mada has its own prefixes, most of them starting with 4 or 5 like the global networks, and foreign tools usually mislabel them as Visa or Mastercard. This tool identifies them correctly.

Is the card number sent to a server?

No. The Luhn algorithm is simple arithmetic that runs in the page with JavaScript. Close the tab and the number is gone. You can disconnect from the internet and it still works.

What is the Luhn algorithm?

It doubles every second digit from the right, adds the results, and the number is format-valid when that total divides by ten. It catches any single mistyped digit and most swaps of two adjacent digits.

Related tools