How to use Check digits
- 1. Pick an algorithm. Luhn for cards, ISBN for books, GSTIN format for India.
- 2. Paste a number. Spaces are ignored for Luhn.
- 3. Read valid/invalid. Checksum only.
- 4. Generate Luhn. For fixtures, not live charges.
About this tool
Check digits catch typos. They do not prove a PAN is issued or a GSTIN is registered. Use this when writing validators and tests.
Luhn
Used by most payment PANs. Doubling every second digit from the right.
GSTIN
This checks the canonical 15-character pattern, not the checksum letter in full tax-engine depth.
Code examples
Luhn
luhnCheck("4242424242424242")