CVV Length Checker
Reference for CVV/CVC/CID length by card brand.
| Brand | Code | Digits | Location |
|---|---|---|---|
| Visa | CVV2 | 3 | Back |
| Mastercard | CVC2 | 3 | Back |
| Discover | CID | 3 | Back |
| AMEX | CID | 4 | Front |
Use the CVV Validator to check a specific code.
How this tool works
Card security codes are a fixed length per brand, and the length is fixed by the ISO/IEC 7812 document set. Visa, Mastercard, Discover and most national schemes use three digits. American Express and Diners Club use four. Knowing the length for a given card is a cheap way to catch a truncation or a stray keystroke before a transaction is attempted.
The mapping is short enough to state in full, and this tool applies it to the number you give it, so a four digit code against a Visa or a three digit code against an American Express is reported immediately. It reads the brand from the major industry identifier rather than from anything you type, so there is nothing to configure.
Worked examples
| Brand | Code length | Position |
|---|---|---|
| Visa | 3 digits | Back of the card |
| Mastercard | 3 digits | Back of the card |
| Discover | 3 digits | Back of the card |
| American Express | 4 digits | Front of the card |
| Diners Club | 4 digits | Front of the card |
The position matters as much as the length. A customer looking for a four digit code on the back of an American Express will not find it there.
When to use it
- Validate a code at the point of entry against the brand of the number
- Build a length rule for a checkout form from the card's prefix
- Check a code that arrived from a manual transcription
- Confirm that a stored code is the right shape for its card
Frequently asked questions
How many digits is a security code?
Three on Visa, Mastercard and Discover. Four on American Express and Diners Club. The length is fixed per brand.
Where is the security code on a Mastercard?
On the back, as three digits, in the signature strip beside the printed card number.
Does every card have the same code length?
No. The split is three digits for most brands and four for American Express and Diners Club, and it is worth checking because a customer who assumes three will miss the code on an American Express.
Is the length of the code related to the length of the number?
No. American Express has a 15 digit number and a 4 digit code; Visa has a 16 digit number and a 3 digit code. The two are unrelated.
Why does a wrong length matter?
Because a truncated code is nearly always a typing or scanning error rather than a fraud signal, and catching it locally avoids an authorisation request that would fail anyway.