How many digits does a CVV have?

A CVV is 3 digits on Visa, Mastercard, and Discover cards, and 4 digits on American Express cards. The code prints on the card and never appears in the card number or on the magnetic stripe. No formula can confirm a CVV, because the code carries no checksum.

CVV Digit Verification: Safe Guide for Legitimate Card Payments

That last point matters. Many people search for a "CVV digit check" hoping to test a card before using it. There is no offline test to run. The digits either match what the issuer has on file, or the payment comes back with a decline code.

read more

Digit count by card network

  • Visa, Mastercard, Discover: 3 digits, printed on the back.
  • American Express: 4 digits, printed on the front above the card number.
  • Most debit and prepaid cards: 3 digits, back of the card.
  • Virtual and tokenized cards: 3 or 4 digits that can rotate, shown in the issuer's app.

Where the digits sit on the card

On Visa, Mastercard, and Discover cards the code is the last 3 digits of the block printed to the right of the signature strip. That block can hold 4 digits, and the extra digit is part of the printed card number, not the code. American Express puts its 4-digit code on the front, above and to the right of the card number.

related article

Is there an algorithm that verifies CVV digits?

No. Card numbers pass the Luhn check, a mod-10 formula that catches a mistyped digit in the 15 or 16 digits. CVV codes have no such structure, so a wrong digit and a right digit look identical to any software that is not the issuing bank.

read more

Why the card number has a checksum and the CVV does not

A card number carries a bank identification number, an account sequence, and a check digit, so a formula can flag a typo before the request reaches the network. The CVV is a short secret the issuer generates and stores. Its whole value comes from being known to the cardholder and the issuer and to nobody else, so there is nothing to compute.

What a gateway can validate offline is the card number: Luhn plus a check that the first digits fall inside a known issuer range. That catches typos. It says nothing about whether the CVV is right.

What happens during a real CVV check

  1. The customer types the digits into the checkout form.
  2. The merchant's payment gateway encrypts the value and passes it to the card network.
  3. The network forwards it to the issuing bank, which compares it to the value on file.
  4. The issuer returns an authorization response that includes a CVV result code.

CVV result codes merchants see

  • M (match): the digits matched.
  • N (no match): the digits were wrong.
  • U (unchecked): the issuer could not run the check, often because it does not participate or the data did not arrive.
  • S (should have been present): the merchant sent no code for a card that requires one.
  • P (not processed): the check did not run.

Exact letters vary by network and processor, so read the response codes in your own gateway docs. A "U" is not a pass. Most risk teams treat it as a warning and hold the order for review.

Why a CVV check fails when the digits look right

  • Typo: one wrong digit and the match fails.
  • Wrong block: the customer read the whole 4-digit block on the back and included the extra digit.
  • Wrong card type: Amex codes live on the front, so people hunting the back find nothing.
  • Rotating codes: virtual cards and some wallets generate a fresh code, so an old screenshot stops working.
  • No code on the card: some corporate and gift cards ship without a CVV, which limits them to card-present use.

CVV digits and card-not-present fraud

The CVV exists to show that the buyer holds the physical card, so a mismatch is one of the strongest single signals that an order is stolen. That protection has a limit. A thief who holds the full card data, code included, passes the check as well as the owner does.

Card data traded in online markets is stolen. Buying, selling, or using it is fraud under US federal law and in every state, and a CVV match does not make the transaction legal.

PCI DSS also bars merchants from storing the CVV after authorization. Requirement 3.2 prohibits keeping sensitive authentication data, so no order database should hold a column of card codes for later checks.

Setting CVV rules at checkout

  • Require the code on every card-not-present order, with no exceptions for repeat buyers.
  • Decline on a no-match (N) response instead of retrying the same card.
  • Route unchecked (U) responses to review rather than treating them as approved.
  • Pair the CVV rule with an address verification check, since each signal covers a different gap.
  • Keep the code out of logs, receipts, and support tickets. Store only the result code.

FAQ

Can a CVV be 3 digits on the front?

It happens with a few store-brand and regional cards. If you cannot find the code on either side, check the issuer's app before assuming the card has none.

Do CVV digits ever change?

On a physical card they stay the same until the card is replaced. Virtual cards and tokenized wallets can issue a new code for each merchant or each session.

Is CVV2 the same as CVV?

Yes for checkout purposes. Visa calls its code CVV2, Mastercard calls it CVC2, and American Express calls it CID. The "2" refers to the second generation of the check, not a second code on the card.

Can a merchant verify a CVV without charging the card?

Some gateways support a zero-dollar or one-dollar authorization that returns the CVV result without capturing funds. The issuer still sees a full authorization request, and repeated attempts on one card look like a test attack.