Credit Card & IBAN Validator
Check card numbers with the Luhn algorithm and detect the card brand, batch-validate test numbers, and verify IBANs with the ISO 7064 mod-97 checksum and per-country length rules, with every step shown.
Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. Numbers are checked with JavaScript on this page only. Share links never contain card numbers or IBANs you typed, only the published test values listed here.
Spaces and dashes are ignored. Use test numbers, not your real card.
- Brand
- Formatted
- Length
- Luhn checksum
- IIN / BIN
A passing Luhn check only means the number is well-formed. It does not mean the card exists, is active or has funds; only the card issuer can tell you that during an authorization.
Published by Stripe for sandbox testing (4111 1111 1111 1111 is a long-standing generic Visa test number). Any future expiry date and any CVC work in test mode.
| # | Number | Brand | Length | Luhn | Result |
|---|
Spaces, dashes and a leading "IBAN" are ignored; letters are case-insensitive.
- Country
- Length
- Check digits
- BBAN
- Print format
- Electronic format
A valid checksum catches typos, but does not prove the account exists or that the bank code is real. Countries such as India (IFSC code + account number), the United States (ABA routing number), Canada, Australia, China and Japan do not use IBANs.
About card number and IBAN validation
The Luhn algorithm (mod 10, ISO/IEC 7812) protects payment card numbers against typing mistakes. Starting from the rightmost digit (the check digit) and moving left, every second digit is doubled; if doubling gives a two-digit number, its digits are added (the same as subtracting 9). The number is valid when the total of all digits is a multiple of 10. Luhn catches every single-digit error and most swaps of adjacent digits, which is why checkout forms run it before sending anything to the payment provider.
The first digits of a card number form the IIN/BIN (Issuer Identification Number), which identifies the network and the issuing bank. Visa numbers start with 4, Mastercard with 51–55 or 2221–2720, American Express with 34 or 37, and so on (see the reference table below). Since 2022 the industry has been moving from 6-digit to 8-digit BINs, so treat brand detection from prefixes as a helpful hint, not an authoritative lookup. A number that passes Luhn and matches a brand can still be cancelled, expired or simply made up.
IBAN (International Bank Account Number, ISO 13616) is used in Europe, the Middle East and parts of Africa and the Americas. It consists of a two-letter country code, two check digits and a country-specific BBAN (Basic Bank Account Number) with a fixed length per country. To validate it, move the first four characters to the end, replace each letter with two digits (A = 10 … Z = 35) and compute the remainder modulo 97 of the resulting large number: a correct IBAN always leaves a remainder of 1 (ISO 7064 MOD 97-10). This detects all single-character errors and nearly all transpositions.
Use this page to test form validation, debug payment integrations with sandbox numbers, or double-check an IBAN before a transfer. Never paste real card data into a website, including this one; everything here runs locally, but test numbers are all you need. To redact card numbers and IBANs from logs before sharing them, use the secrets & PII scrubber. For realistic fake data sets use the mock data generator, and build validation patterns with the regex tester.
Reference Guide
Card brand prefixes (IIN ranges) and lengths used for detection:
| Brand | Starts with | Length | Grouping |
|---|---|---|---|
| Visa | 4 | 13, 16, 19 | 4-4-4-4 |
| Mastercard | 51–55, 2221–2720 | 16 | 4-4-4-4 |
| American Express | 34, 37 | 15 | 4-6-5 |
| Discover | 6011, 644–649, 65 | 16–19 | 4-4-4-4 |
| JCB | 3528–3589 | 16–19 | 4-4-4-4 |
| Diners Club | 300–305, 3095, 36, 38–39 | 14–19 | 4-6-4 (14 digits) |
| UnionPay | 62 | 16–19 | 4-4-4-4 |
| Maestro | 5018, 5020, 5038, 5893, 6304, 6759, 6761–6763 | 12–19 | 4-4-4-4 |
| Mir | 2200–2204 | 16–19 | 4-4-4-4 |
Some ranges overlap in practice (for example UnionPay 622126–622925 cards are also accepted on the Discover network, and RuPay shares prefixes with Discover), so a BIN database lookup is the only definitive answer.
IBAN lengths by country (SWIFT IBAN Registry):
| Country | Code | Length | Example |
|---|---|---|---|
| Germany | DE | 22 | DE89 3704 0044 0532 0130 00 |
| United Kingdom | GB | 22 | GB82 WEST 1234 5698 7654 32 |
| France | FR | 27 | FR14 2004 1010 0505 0001 3M02 606 |
| Spain | ES | 24 | ES91 2100 0418 4502 0005 1332 |
| Italy | IT | 27 | IT60 X054 2811 1010 0000 0123 456 |
| Netherlands | NL | 18 | NL91 ABNA 0417 1643 00 |
| Belgium | BE | 16 | BE68 5390 0754 7034 |
| Switzerland | CH | 21 | CH93 0076 2011 6238 5295 7 |
| Norway | NO | 15 | NO93 8601 1117 947 |
| Saudi Arabia | SA | 24 | SA03 8000 0000 6080 1016 7519 |
| United Arab Emirates | AE | 23 | AE07 0331 2345 6789 0123 456 |
| Turkey | TR | 26 | TR33 0006 1005 1978 6457 8413 26 |
| Brazil | BR | 29 | BR18 0036 0305 0000 1000 9795 493C 1 |
The validator knows the lengths of all registry countries; the shortest IBAN is Norway's (15 characters) and the longest is Saint Lucia's (32). Check digits are always between 02 and 98.
Example input
Card: 4242 4242 4242 4242 → Visa, 16 digits, Luhn sum 80 → valid IBAN: GB82 WEST 1234 5698 7654 32 → United Kingdom, 22 characters, mod 97 = 1 → valid
This sample loads automatically when you open the tool. Use Load Sample to bring it back.
Frequently Asked Questions
The Luhn algorithm is a checksum used by card numbers to catch typing mistakes. Doubling every second digit from the right and summing the digits must give a multiple of 10.
No. Passing the Luhn check only means the number is well-formed. It says nothing about whether the card exists, is active or has funds.
The first four characters are moved to the end, letters are converted to numbers (A = 10 to Z = 35) and the result must leave a remainder of 1 when divided by 97. The length must also match the country.
Related Tools
All Security Tools →AWS IAM Policy Viewer & Analyzer
Visualize AWS IAM policy JSON as readable statements, see wh...
JWT Secret Key Generator Online
Generate cryptographically secure random secret keys for JWT...
JWT Decoder
Decode JWT headers and payloads, inspect claims, and quickly...
Robots.txt Generator
Generate robots.txt rules for search engine crawlers, includ...
Schema Generator
Create SEO-friendly JSON-LD schema markup for articles, prod...
HTML Minifier
Minify HTML to reduce file size by removing whitespace, comm...