
Web Scripts & Software
DEV3 Credit Card Number Validator (Luhn) — Source Code (React + Tailwind)
from $29
Live demoLoading…
Developer tool
Free, no sign-up. Runs in your browser; nothing is uploaded. Buy the source code: $29 Regular / $69 Extended
Everything runs in your browser; numbers are never sent or stored. Please use test numbers, not real cards. This tool checks format only and cannot tell whether a card is real or has funds.
Enter a number to test.
Need Credit Card Number Validator (Luhn) built into your own product? We build it as a full app, API and admin included. Built in about a week, from $99. Send your requirements or SOW; you get a fixed quote and a delivery date.
The credit card number validator (luhn) stays free to use online. If you want the code to run, edit and ship in your own project, get the full source from the DEV3 Marketplace. Instant download, 6 months of support.
Skip the build: ready-made apps with the code included. Buy once, own the source, and try each one live first.

Web Scripts & Software
from $29
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demo
Enterprise SaaS Starters
from $99
Live demoEvery payment card number ends with a check digit calculated by the Luhn algorithm, invented in 1954 and now standard (ISO/IEC 7812). A checkout form can use it to reject typos before a request is sent to the bank. This tool runs that check and shows every step, so developers and students can see why a number passes or fails.
Take 4242 4242 4242 4242. From the right, double the 2nd, 4th, 6th digit and so on: the 4s become 8, the 2s become 4. The doubled and untouched digits add to 80, which is a multiple of 10, so the number passes. Change the last digit to 1 and the total becomes 79, so it fails.
The leading digits identify the network. Visa starts with 4, Mastercard with 51-55 or 2221-2720, American Express with 34 or 37 (15 digits), Discover with 6011, 644-649 or 65, JCB with 3528-3589, Diners Club with 36, 38 or 300-305, UnionPay with 62, RuPay with 60, 65, 81 or 82, and Mir with 2200-2204. Some ranges overlap, so the tool applies them in a fixed priority and also checks the usual length for the network.
IMEI numbers (15 digits) and many membership, SIM and loyalty IDs use the same rule. The check-digit calculator on this page computes the last digit for a payload you already own; it is not a card generator.
It proves only that the digits are consistent with the checksum rule used by card numbers, IMEI numbers and many IDs. It catches nearly every single mistyped digit and most swapped pairs. It does not prove that a card exists, is active or has funds.
No, on purpose. A random number that passes Luhn can be misused. For checkout testing, use the official sandbox numbers listed on this page, which only work inside Stripe, Razorpay or PayPal test mode.
From the first digits, the issuer identification number: Visa starts with 4, Mastercard with 51 to 55 or 2221 to 2720, American Express with 34 or 37, and so on. The ranges are dated on the page and acquirers publish exact BIN tables for production use.
The check runs entirely in your browser and the number is never sent, stored or logged. Even so, avoid pasting real cards into any web page. Use a test card or only the first and last digits you need.
Gateways decline numbers that are not in their test list, and they decline real numbers in test mode. Use the exact number, any future expiry, any three-digit code (four for Amex) and any postcode.
The optional CVV field only checks length: three digits for most cards and four for American Express. The real code can only be verified by the card issuer.