---
title: "Credit Card Validator - Check card number validity and brand"
description: "Validate the brand, length, and Luhn checksum of a credit card number. Load test numbers and check payment form input or card number structure."
canonical_url: "https://web-toolbox.dev/en/tools/credit-card-validator"
meta:
  author: K
  "og:description": "Validate the brand, length, and Luhn checksum of a credit card number. Load test numbers and check payment form input or card number structure."
  "og:image": "https://web-toolbox.dev/og/en/tools/credit-card-validator-93d69069.png"
  "og:image:alt": "Credit Card Validator"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "Credit Card Validator - Check card number validity and brand"
---

> Index of every page on this site: [llms.txt](https://web-toolbox.dev/llms.txt)

# **Credit Card Validator**

Validate card numbers and identify brands

**Card number to validate**

Validated in your browser. No data is sent to a server.

**Not detected**

**Empty**

•••• •••• •••• ••••

ISO/IEC 7812

## **Validation result**

**No validation result yet**

Enter a number to see the brand, length, and Luhn result.

<dl>

<dt>Card brand</dt>
<dd>**Not detected**</dd>

<dt>Formatted number</dt>
<dd>

\-

</dd>

<dt>Valid lengths</dt>
<dd>Not detected</dd>

<dt>Security code</dt>
<dd>Not detected</dd></dl>

### **Validation checks**

- Brand Not detected
- Length Not detected
- Luhn Not detected

## What is Credit Card Validator?

Credit Card Validator checks the brand, length, and Luhn checksum of a credit card number. It identifies whether a number matches a brand such as Visa or Mastercard, whether it has a valid length, and whether its check digit is correct. All processing runs in your browser.

Entered card numbers are validated only by this page. They are never sent over the network.

## How to Use

1. Enter a credit card number. Spaces and hyphens are allowed.
2. Review the result and the brand, length, and Luhn details.

The number is formatted with the brand's grouping as you type. The result updates as you type, and the status is one of incomplete, invalid, or valid.

### Reading the Result

- Valid: the brand is identified, and both the length and Luhn check pass.
- Incomplete: the number is shorter than the required length or is between allowed lengths. Keep typing to update the result.
- Invalid: the input contains characters other than digits, the length is not allowed, the Luhn check fails, or the brand is not supported.

Open the Luhn details to see the transformed digits, the sum, and the remainder after dividing by 10.

## Test Numbers

Use the following numbers for testing. They are test numbers, not real cards.

| **Brand** | **Number** |
| --- | --- |
| Visa | `**4242424242424242**` |
| Mastercard | `**5555555555554444**` |
| American Express | `**378282246310005**` |
| JCB | `**3530111333300000**` |
| Diners Club | `**30000000000004**` |
| Discover | `**6011000990139424**` |
| UnionPay | `**6200000000000005**` |
| Luhn failure example | `**4242424242424241**` |

You can also load them from the test numbers in the tool.

## Use Cases

- Confirming that test card numbers match a brand's rules
- Narrowing down whether a length or Luhn issue is causing a problem during debugging

## About the Luhn Algorithm

The Luhn algorithm validates the check digit of a card number. Starting from the right, every second digit is doubled. If the result is greater than 9, 9 is subtracted, and the values are summed. The number passes when the sum is divisible by 10.

It helps detect input mistakes, but passing the Luhn check does not mean the card is real or usable.

## Things to Keep in Mind

- This tool checks the structure of the number only. It does not verify the expiry date, security code, balance, or whether the card can be used.

**How was your experience?**

Last updated: October 22, 2026

### **Related Tools**

- [<h4>**CSP Parser**</h4>](https://web-toolbox.dev/en/tools/csp-parser)
- [<h4>**Password Generator**</h4>](https://web-toolbox.dev/en/tools/password-generator)
- [<h4>**SHA Hash Generator**</h4>](https://web-toolbox.dev/en/tools/sha-hash-generator)
- [<h4>**ULID Generator**</h4>](https://web-toolbox.dev/en/tools/ulid-generator)
- [<h4>**UUID/GUID Generator**</h4>](https://web-toolbox.dev/en/tools/uuid-generator)
- [<h4>**Color Contrast Checker**</h4>](https://web-toolbox.dev/en/tools/color-contrast-checker)
- [<h4>**CSS Cursor Viewer**</h4>](https://web-toolbox.dev/en/tools/css-cursor-viewer)
- [<h4>**IP Address Checker**</h4>](https://web-toolbox.dev/en/tools/ip-address-checker)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://web-toolbox.dev/en#website","@type":"WebSite","description":"アカウント登録不要で使える無料Web開発ツール80種類以上。JSON整形、Base64変換、カラーコード変換、QRコード生成などをブラウザ上で瞬時に実行。開発者の作業効率を大幅に向上させます。","inLanguage":"en-US","name":"Web ToolBox","url":"https://web-toolbox.dev/en","translationOfWork":{"@id":"https://web-toolbox.dev/#website"}},{"@id":"https://web-toolbox.dev/en/tools/credit-card-validator#webpage","@type":"WebPage","description":"Validate the brand, length, and Luhn checksum of a credit card number. Load test numbers and check payment form input or card number structure.","name":"Credit Card Validator - Check card number validity and brand","url":"https://web-toolbox.dev/en/tools/credit-card-validator","isPartOf":{"@id":"https://web-toolbox.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://web-toolbox.dev/en/tools/credit-card-validator"]}]},{"@id":"https://web-toolbox.dev/en/tools/credit-card-validator#/schema/web-application/1","@type":"WebApplication","applicationCategory":"UtilityApplication","description":"Validate the brand, length, and Luhn checksum of a credit card number. Load test numbers and check payment form input or card number structure.","name":"Credit Card Validator - Check card number validity and brand","operatingSystem":"Windows, macOS, Linux, Android, iOS"}]}
```

## Sitemap

See the full [sitemap](https://web-toolbox.dev/sitemap.md) for all pages.
