This tool validates the format of a 15-character India GSTIN (GST Identification Number). It decodes the state code, checks the embedded PAN, and recomputes the check digit offline — useful for catching typos on invoices and in vendor records before filing.
How it works
A GSTIN is 15 characters with a fixed structure:
| Position | Length | Meaning |
|---|---|---|
| 1–2 | 2 | State code (e.g. 27 = Maharashtra) |
| 3–12 | 10 | Holder’s PAN (AAAAA0000A pattern) |
| 13 | 1 | Entity number for that PAN in the state |
| 14 | 1 | Reserved (currently Z) |
| 15 | 1 | Base-36 check digit |
The validator decodes the state code to a name, verifies the embedded PAN pattern (five letters, four digits, one letter), and recomputes the GSTN base-36 check digit over the first 14 characters: each character maps to 0–35 (0–9 then A–Z), is multiplied by an alternating factor of 1 and 2, and the quotient and remainder of dividing each product by 36 are summed; the check value is (36 − sum mod 36) mod 36. It compares that to the 15th character.
Example
For 22AAAAA0000A1Z5:
- State code
22→ Chhattisgarh - PAN =
AAAAA0000A→ matches the valid pattern - Entity number
1, reservedZ - Check digit recomputed over the first 14 characters and compared to
5
If the recomputed digit matches, the GSTIN is well-formed.
This is privacy-first: the check digit is computed locally with no GST portal lookup. A valid result means the number is well-formed — verify an active registration on the official GST portal.