A GSTIN is tested by checking its 15-character structure, verifying the 15th checksum digit, and confirming it on the GST portal's search taxpayer page.
Enter the GSTIN on the GST portal's "Search Taxpayer" page and the portal tells you whether it is active, and shows the legal name and state of the business. A GSTIN that fails the structure or checksum test is invalid before you even get to the portal. Here is what a valid one looks like: 22AAAAA0000A1Z5 — 15 characters, where 22 is the state code, AAAAA0000A is the PAN, Z is the entity code, and 5 is the checksum digit.
The 15 Characters and What Each One Means
A GSTIN is built entirely from the PAN plus four extra characters, so you can test most of it by eye.
| Characters | What they are | Example |
|---|---|---|
| 1–2 | State code (GST state code, not always the same as the vehicle code) | 22 = Chhattisgarh |
| 3–12 | The 10-character PAN of the registered person | AAAAA0000A |
| 13 | Entity number within that PAN: 1–9, then A to Z for the 10th onwards | 1 |
| 14 | Always Z by default; A to Z for NRI taxpayers | Z |
| 15 | Checksum: a letter or number computed from the first 14 characters | 5 |
Two quick eye tests: the 3rd character must be a letter (P for individual, C for company, F, A, T, H for firm, AOP, trust and HUF), and the 4th character must match the holder's name initial. The 14th character is Z for normal taxpayers; anything else there is suspicious unless the registration is an NRI one.
The Checksum Digit Catches Typos
The 15th character is computed from the first 14 using a formula set by GSTN (the Goods and Services Tax Network), which runs the GST portal. The method: convert each character to a number (letters A–Z become 1–26, digits keep their face value), multiply alternate positions by 1 and 2, add the digits of each product, sum them, and the checksum is 36 minus that sum modulo 36 — mapped back to 0–9 then A–Z.
You do not need to do this by hand. Any invoice software, the portal, and most free GSTIN validators run it for you. The point of knowing it exists: if a GSTIN fails the checksum, one character was mistyped or the number was invented. Fix the typo before rejecting the invoice.
Verifying on the GST Portal
Structure and checksum only prove the number is well-formed, not that it belongs to a live business. For that, use the portal.
- Go to the GST portal (gst.gov.in) and open the Search Taxpayer option under Search.
- Choose "Search by GSTIN/UIN".
- Type the full 15 characters and submit.
- Read the result: the legal name, trade name, state, registration date, and the status — Active, Cancelled, Suspended or Provisional.
No login is needed; the search is public. If the status is Cancelled, invoices issued after the cancellation date do not qualify for input tax credit, so the status matters as much as the existence. You can also search by PAN to see every GSTIN registered under that PAN across states.
If a GSTIN passes the checksum but returns no result on the portal, it was never issued — the number is fake.
Test GSTINs for Software and Sandbox Use
Developers testing invoice or accounting software cannot use random numbers, because the checksum will fail. The GST ecosystem provides sandbox environments with clearly marked test GSTINs — numbers that pass the checksum algorithm but are never issued to real businesses. Use the test credentials and sample GSTINs published for the sandbox environment you are integrating with, not numbers copied from live invoices.
A safe self-made alternative for unit tests: take any valid-looking 14 characters and compute the 15th with the checksum formula above, so your test string at least exercises the validation code path. Never use a real taxpayer's GSTIN in test data.
Where a GSTIN Check Fits in Your Workflow
Rule of thumb: check the structure the moment you receive the number, and check the portal status before your first invoice and again around each filing period. Registration status can change — a business can cancel or be suspended — so a one-time check is not enough for a long-running vendor.
Three places the check saves real money:
- Vendor onboarding: confirm the GSTIN is active and the legal name matches the vendor's PAN and bank records before the first purchase.
- Invoice verification: an invoice with an invalid or cancelled GSTIN can block your input tax credit claim, so test before you book it.
- e-way bills: a wrong GSTIN on an e-way bill can hold up goods in transit.
What Trips People Up When Testing GSTINs
The most common error is treating a well-formed number as a verified one. The checksum only tests arithmetic; only the portal confirms the taxpayer exists.
Other frequent slips:
- Confusing the GST state code with the RTO vehicle code — for example, Chhattisgarh is 22 for GST but CG for vehicles. Test against the GST state code list.
- Expecting the 13th character to always be 1 — a business with multiple registrations in one state under one PAN gets 2, 3 and so on, then letters.
- Assuming a Cancelled status means the number was fake — it usually means a genuine registration that was later closed. The portal shows the cancellation date so you can judge which invoices were valid.
- Trimming spaces or hyphens before testing — a GSTIN has no separators, so paste it clean.
- Testing only the first GSTIN of a multi-state vendor — one PAN can hold a GSTIN in every state where it has operations, and each must be active in its own state.
Questions People Ask
Can a GSTIN be valid but the business still not exist?
Yes, in the sense that the 15 characters can pass the checksum. That is why the portal search is the real test — it returns only numbers actually issued by GSTN.
Is a GSTIN the same as a GST number?
Yes. GSTIN (GST Identification Number) is the formal name for the 15-character number printed on invoices and shown on the registration certificate.
Do I need a login to test a GSTIN?
No. The Search Taxpayer page on the GST portal works without any login and shows the legal name, state and registration status.
What does the Z in position 14 mean?
It is the default filler character for regular taxpayers. Letters A to Z in that position appear for NRI registrations, so a Z there is normal, not an error.