HomeCredit Card Validators
Credit Card Validators
Validate major card providers, CVVs, and expiry.
19 Tools Available
Visa Card
Starts with 4, 13 or 16 digits.
/^4[0-9]{12}(?:[0-9]{3})?$/
MasterCard
Starts with 51-55, 16 digits.
/^5[1-5][0-9]{14}$/
Amex
Starts with 34/37, 15 digits.
/^3[47][0-9]{13}$/
Discover
Starts with 6011/65, 16 digits.
/^6(?:011|5[0-9]{2})[0-9]{12}$/
Diners Club
Starts with 300-305/36/38.
/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/
JCB
Japanese Credit Bureau.
/^(?:2131|1800|35\d{3})\d{11}$/
UnionPay
China UnionPay.
/^(62[0-9]{14,17})$/
Maestro
Maestro Debit.
/^(5018|5020|5038|6304|6759|6761|6763)[0-9]{8,15}$/
CVV 3 Digit
Visa/MC CVV.
/^\d{3}$/
CVV 4 Digit
Amex CVV.
/^\d{4}$/
Expiry MM/YY
Standard expiry.
/^(0[1-9]|1[0-2])\/\d{2}$/
Expiry MM/YYYY
Full year expiry.
/^(0[1-9]|1[0-2])\/\d{4}$/
Track 1 Data
Magnetic stripe track 1.
/^%B[0-9]{1,19}\^[A-Za-z\s]{2,26}\^[0-9]{4,7}\?/
Track 2 Data
Magnetic stripe track 2.
/;[0-9]{1,19}=[0-9]{4,7}\?/
Masked Card
Matches ****1234.
/\*{4,}\d{4}/
Luhn Check
Matches standard card length.
/^\d{13,19}$/
Card Space Separated
Formatted visual card.
/\d{4}\s\d{4}\s\d{4}\s\d{4}/
Card Dash Separated
Formatted visual card.
/\d{4}-\d{4}-\d{4}-\d{4}/
Rupay
Matches Rupay cards.
/^6[05][0-9]{14}$/