How it works
The validator reads the GSTIN you type, removes spaces and dashes, and checks:
- Length is 15.
- State code (characters 1–2) is in the GST master list of state codes.
- PAN (characters 3–12) has five letters, four digits and a letter.
- Registration number (character 13) is 1–9 or A–Z, and character 14 is “Z”.
- Check character (character 15) matches the first 14, using a base-36 method with weights 1 and 2.
Worked example
Take the made-up GSTIN 29ABCDE1234F1ZW.
- 29 → Karnataka.
- ABCDE1234F → a well-formed PAN.
- 1 → the registration number under this PAN in Karnataka; Z → normal taxpayer.
- The check character worked out from the first 14 characters is W, which matches.
Result: Format and check digit are valid. Change any one character, say 29ABCDE1243F1ZW (two digits swapped), and the check character no longer matches — the usual sign of a typo.
Notes and edge cases
- Code 28 is not in the e-invoice master list; Andhra Pradesh is 37 there.
- 97 is “Other Territory” in the master list; 96 and 99 there stand for other countries, not states.
- The layout after the state code is not officially published that we could find. A GSTIN that fails on character 13, 14 or 15 is most likely a typo; confirm it on the GST portal rather than rejecting it outright.
- Format is not status. A GSTIN can be well formed but cancelled or suspended. Before you claim input tax credit, check the supplier’s status and filing on the GST portal.
- PAN is not verified against the income-tax database; only its shape is checked.














