CVV Validator
Check the format and expected length of a CVV/CVC/CID for each brand.
Rules
- Visa, Mastercard, Discover: 3-digit CVV on the back.
- AMEX: 4-digit CID on the front.
Related tools
How this tool works
A card security code is three digits on Visa, Mastercard and Discover, printed on the back, and four digits on American Express, printed on the front. The brand names differ: Visa calls it CVV2, Mastercard CVC2, Discover CID, and American Express CID as well. The value is generated by the issuer, printed on the card, and sent with a card-not-present transaction so the issuer can confirm the number was read from a physical card rather than copied from a list.
This tool checks the format against the brand implied by the card number, so it catches the two mistakes that actually occur: a code of the wrong length for that brand, and a code containing a character that is not a digit. It deliberately does not tell you whether the code matches the issuer's record, because that comparison happens at the issuer during an authorisation and cannot be done from a format alone.
Worked examples
| Number | Code | Result |
|---|---|---|
| 4242 4242 4242 4242 (Visa) | 123 | 3 digits, correct for Visa |
| 3782 822463 10005 (Amex) | 1234 | 4 digits, correct for American Express |
| 5555 5555 5555 4444 (Mastercard) | 12 | Too short, Mastercard uses 3 digits |
| 4242 4242 4242 4242 (Visa) | 12a | Contains a non-digit character |
The brand is taken from the number's major industry identifier, so a mismatch between the number and the code length is caught before anything is sent to the issuer.
When to use it
- Validate the security code a customer typed before the transaction is attempted
- Catch a truncated or over-typed code at the point of entry
- Confirm that a stored code matches the length rules of the card's brand
- Sanity-check test data in a checkout integration
Frequently asked questions
What is a CVV?
The Card Verification Value: the three or four digit security code printed on a payment card and sent with a card-not-present transaction so the issuer can confirm the number was read from the card.
How many digits is a CVV?
Three on Visa, Mastercard and Discover, printed on the back. Four on American Express, printed on the front and called CID.
Is CVV the same as CVC?
Yes. They are the same number under different brand names: CVV2 for Visa, CVC2 for Mastercard. The generic term is CVV.
Can I check whether a CVV is correct with this tool?
No, and no offline tool can. Whether the code matches the issuer record is known only to the issuer, and it is established during an authorisation.
Why is my code rejected when it is three digits?
Usually the length is fine and something else is wrong: the code does not match the issuer record, the card was reissued and the code changed, or the transaction was declined for an unrelated reason such as a block or an insufficient balance.
Where is the CVV on a Visa card?
On the back, in the signature strip, as the last three digits of the printed code.