CC Expiry Validator
Validate a credit card expiry date in MM/YY format, checking the month and whether it has not expired. Useful for payment forms and checkout flows.
MM/YY and the last valid day
At checkout, the expiry field is where customers slip the most: they type 1/28, they type 12/2028, they swap month and year. And there is the question that resurfaces in every code review: does a card marked 07/26 still work on 26 July 2026? It does. A card is good through the last day of the printed month, and treating the current month as expired kills payments that were perfectly fine.
The check has two halves. The format is strict: two digits, a slash, two digits, with the month between 01 and 12. No 1/28, no 12/2028, no 12-28, and that is deliberate, since it matches what card terminals and most payment forms expect to receive. Then comes the comparison against your device date, where the current month still counts as valid and only months already behind get rejected.
Two things to keep in mind. The two digit year is read as belonging to this century, so 12/99 comes back valid in the sense of 2099, and a card from 1999 would land on the same answer. Nobody types that in practice, but it explains where the verdict comes from. And the clock is the one on the machine doing the testing, not the server, so a wrong system date changes the result. This checks the expiry only; the card number needs a separate Luhn check, and nothing is sent anywhere.
Frequently asked questions
Does a card marked 07/26 work in July 2026?
Why is 12/2028 reported as invalid?
Does this validate the card number?
Related Tools
MCC (Card) Validator
Validates 4-digit MCC codes used by card networks and shows the category description (e.g., 5411 = Grocery Stores).
Credit Card Validator
Validate credit card numbers using the Luhn algorithm. Identifies the card brand and verifies the check digit, no data sent to servers.
Card BIN Validator
Identifies card brand (Visa, Master, Elo, Hipercard, Amex, JCB etc.) and type (credit/debit) from the first 6-8 digits of the card.
Chile RUT Validator
Validate Chilean RUT (Tax ID) — number + check digit (0-9 or K) computed via mod 11. Accepts dotted/hyphenated format.
Luhn Validator (generic)
Validate any numeric sequence using Luhn (mod 10) — used in credit cards, IMEI, ICCID and other IDs. Shows check digit.
Brazilian DDD Validator
Validate Brazilian DDD area code (2 digits) and show region.