A GSTIN that passes its check digit can still be the wrong GSTIN
The last character of a GSTIN is a check character computed from the first fourteen, so a checker can tell you a GSTIN was typed wrong, but not that it was typed right: a well-formed GSTIN can still
Summary
The last character of a GSTIN is a check character computed from the first fourteen, so a checker can tell you a GSTIN was typed wrong, but not that it was typed right: a well-formed GSTIN can still belong to a cancelled registration or a different business. A PAN check, as a free tool can do it, tests only the shape and the fourth, holder-type letter, and proves even less.
The situation
An article assistant is handed a vendor master of 400 rows before the GSTR-2B reconciliation or a TDS return. Some GSTINs have a digit swapped, some PANs have an O where a zero should be, one vendor appears three times, and someone has pasted Aadhaar numbers into the same column. The question is which rows to chase before they cause a mismatch.
The rule
A GSTIN is fifteen characters. Two digits of state code, the holder's ten-character PAN, a thirteenth character numbering that PAN's registrations in the state (1 to 9, then A to Z), a fourteenth that is `Z` for a regular taxpayer, and a fifteenth check character. The check character is a base-36 weighted sum of the first fourteen characters. So `22AAAAA0000A1Z` must end in `C`; the textbook example ending in `5` fails.
State codes run 01 to 38, plus 97 (Other Territory) and 99 (Centre Jurisdiction). Code 25 (Daman and Diu) and code 28 (the old Andhra Pradesh) are retired, merged into 26 and replaced by 37.
A PAN is `AAAAA9999A`. The fifth letter is the first letter of the surname or of the entity's name, and the fourth tells you what kind of holder it is, as the Income Tax Department describes:
| 4th character | Holder |
|---|---|
| P | Individual |
| C | Company |
| H | Hindu undivided family |
| F | Firm / LLP |
| A | Association of persons |
| B | Body of individuals |
| T | Trust |
| L | Local authority |
| J | Artificial juridical person |
| G | Government |
Aadhaar is twelve digits, never starting with 0 or 1, and its last digit is a Verhoeff check digit. UIDAI does not allow an entity to keep Aadhaar numbers in its records in any form, and requires the first eight digits masked before a copy is stored (sections 29 and 37 of the Aadhaar Act, 2016).
Where people go wrong
Treating "valid" as "active". A check character proves the number is well formed. Status, name and address come only from the GST portal's Search Taxpayer and the e-filing portal's PAN verification.
Correcting a retired state code as a typo. A 25 or 28 GSTIN in an old master is a migration to chase, not a keying error.
Reading a D or C in the fourteenth place as a mistake. Those are TDS-deductor and TCS-collector registrations, and their PAN slot may carry a TAN.
Keeping Aadhaar numbers in the vendor sheet. Mask them before the sheet goes anywhere.
What to do
- Run every GSTIN through its check character before a reconciliation, and fix the failures at source.
- Check each PAN's fourth letter against the vendor's form of business.
- Confirm status on the portals for anything you will rely on for credit or deduction.
- Mask Aadhaar to the last four digits in every file you keep.
The tool
I kept doing this row by row, so I built a small page. Paste a column straight from Excel, mixed or not; every cell of each row is tried, each ID is classified and checked, duplicates are marked against their first line, a wrong GSTIN check character is shown with the correct one, Aadhaar is masked in every output by default, and a clean CSV comes back. It does not look anything up on the GST or PAN portals, it cannot say whether an ID is active, and it does not check TAN, CIN or IFSC. Nothing is uploaded.
Sources
- Income Tax Department — how PAN is formed — https://www.incometaxindia.gov.in/w/how-pan-is-formed-and-how-it-gets-its-unique-identity-
- ClearTax — know your GSTIN — https://cleartax.in/s/know-your-gstin
- ClearTax — GST state codes — https://cleartax.in/s/gst-state-code-jurisdiction
- Busy — GSTIN format and check digit — https://busy.in/gst/gstin-everything-you-need-to-know/
- UIDAI — Aadhaar Act, 2016 and storage of Aadhaar numbers — https://uidai.gov.in