Skip to content
T
Tools.Town
Free Online Tools for Everyone
India Tools

How GSTIN Works: Structure, State Codes and Checksum

A plain-English breakdown of the 15-character Indian GSTIN — what each part means, how the checksum is computed, and how to spot an invalid number before it costs you.

23 June 2026 4 min read By Tools.Town Team Fact Checked

Key Takeaways

  • No
  • Yes
  • The 14th position was reserved for future use and is set to the default letter 'Z' for ordinary registrations

The number on every Indian invoice

Since 2017, the GSTIN — Goods and Services Tax Identification Number — has appeared on Indian tax invoices, registration certificates, and vendor records. It looks like a random 15-character jumble: 27AAPFU0939F1ZV. It isn’t random at all. Every position carries meaning, and the last character is a mathematical check digit that lets you catch most typos instantly. This guide walks through the structure piece by piece, and the GST Number Validator lets you decode any GSTIN as you read.

The 15 characters, decoded

A GSTIN is always exactly 15 characters, broken into five parts:

  1. State code (characters 1–2) — two digits identifying the state or union territory of registration.
  2. PAN (characters 3–12) — the 10-character Permanent Account Number of the business.
  3. Entity number (character 13) — how many registrations this PAN holds in that state.
  4. Default letter (character 14) — currently always ‘Z’.
  5. Checksum (character 15) — a single check character derived from the first 14.

Take 27AAPFU0939F1ZV: state code 27 (Maharashtra), PAN AAPFU0939F, entity number 1, the default Z, and checksum V. The GST Number Validator extracts each of these automatically.

State codes

The first two digits map to the official GST state-code list. A few common ones: 07 is Delhi, 09 is Uttar Pradesh, 24 is Gujarat, 27 is Maharashtra, 29 is Karnataka, 33 is Tamil Nadu, and 36 is Telangana. The codes run from 01 (Jammu & Kashmir) upward, with a couple of special codes like 97 for “Other Territory”. A GSTIN whose first two digits aren’t on the list can’t be genuine, which is the first thing a validator checks.

The embedded PAN

Characters 3 through 12 are the holder’s PAN, and the PAN itself has structure: five letters, four digits, then one letter. The fourth character of the PAN — the sixth character of the GSTIN overall — reveals the type of taxpayer:

  • P — individual or proprietor
  • C — company
  • F — firm or LLP
  • H — Hindu Undivided Family (HUF)
  • T — trust
  • A — association of persons
  • G — government

In AAPFU0939F, the fourth letter is F, so this is a firm or LLP. That single character tells you a lot about who you’re dealing with, and the validator surfaces it for you.

The entity number

The 13th character counts registrations for that PAN within the state. The first registration gets 1, the second 2, and so on; after 9 it continues with letters. This is how one business group legitimately holds several GSTINs under the same PAN — one per state, plus additional ones for separate verticals within a state.

The checksum: how typos get caught

The final character is where the real validation power lives. It’s computed from the first 14 characters using a base-36 (mod 36) algorithm — a cousin of the Luhn check used on credit cards. In outline:

  1. Map every character to a code point over 0-9 then A-Z, so digits are 0–9 and letters are 10–35.
  2. Working right to left, multiply each code point by an alternating weight of 1 and 2.
  3. Fold each product as floor(value / 36) + (value % 36) and add it to a running sum.
  4. The check digit is (36 − sum % 36) % 36, mapped back to a character.

If even one character is mistyped, the recomputed check digit almost always disagrees with the printed one, so the number is rejected. The GST Number Validator runs this exact calculation in your browser and shows both the expected and the found check character when they differ.

What validation can and cannot tell you

Format and checksum validation is fast and catches the overwhelming majority of mistakes: wrong length, an impossible state code, a transposed digit, a dropped character. What it cannot do is confirm that a GSTIN was actually issued or is currently active. A number can be perfectly well-formed and still belong to no one. That’s an important limit: treat a “valid” result as “this could be a real GSTIN”, not “this is a registered business”. For anything with legal or financial weight, verify on the official GST portal.

A practical checklist

Before you record a supplier’s GSTIN, run through this:

  • Is it exactly 15 characters with no stray spaces?
  • Do the first two digits match a real state code — ideally the supplier’s stated state?
  • Does the embedded PAN’s type character match the kind of business you expect?
  • Does the checksum pass?

The validator does all four in one go, which is far quicker than eyeballing it. Catching a bad GSTIN at data-entry time saves you from input-tax-credit problems later, when fixing it means amending filings.

A worked example

Walk through 27AAPFU0939F1ZV end to end. The first two characters, 27, are a valid state code — Maharashtra. Characters 3–12, AAPFU0939F, form a PAN: five letters, four digits, a final letter, so the structure is right. The fourth letter of that PAN is F, marking a firm or LLP. The 13th character, 1, says this is the first registration for that PAN in Maharashtra. The 14th is the default Z. Finally, the checksum routine runs over the first 14 characters and produces V, which matches the printed 15th character — so the number is internally consistent. Change any single character and the recomputed checksum almost always stops matching, which is how the GST Number Validator flags a typo immediately.

Where invalid GSTINs come from

Most bad GSTINs aren’t fraud — they’re honest mistakes. Someone transposes two digits while copying from a paper invoice, drops a character during a phone call, or pastes a number with a trailing space. Optical character recognition from scanned documents is another common source, mixing up visually similar characters like 0 and O or 1 and I. Because the checksum was designed to catch exactly these single-character and transposition errors, a quick validation pass turns a silent data-entry slip into an immediate, fixable flag — long before it reaches a GST return where corrections are painful.

Where to go next

If you work with Indian financial data a lot, you may also like turning amounts into words for cheques and invoices — see the currency-words guide. And whenever you need to sanity-check a GSTIN, the GST Number Validator is one paste away.

Advertisement

Try GST Number Validator — Free

Apply what you just learned with our free tool. No sign-up required.

Try GST Number Validator

Frequently Asked Questions

Is a format-valid GSTIN definitely registered?
No. Passing the format and checksum checks only proves a number is internally consistent — it does not prove the GSTIN has been issued or is currently active. For legal or payment decisions, always confirm on the official GST portal.
Can two businesses share a PAN inside their GSTINs?
Yes. A single PAN can have multiple GST registrations — one per state, and more than one within a state for separate business verticals. That's exactly what the entity-number character (the 13th) tracks.
Why is the 14th character almost always 'Z'?
The 14th position was reserved for future use and is set to the default letter 'Z' for ordinary registrations. You'll see 'Z' on virtually every GSTIN in circulation today.

Was this guide helpful?

Your feedback helps us improve our content.

Continue Reading

All India Tools Guides

Get the best India Tools tips & guides in your inbox

Join 25,000+ users who get our weekly india tools insights.