Check a GSTIN
Type or paste the 15-character GST number. The result appears automatically.
Validated locally — nothing leaves your device.
What this checks
Structure, a recognised state code, a well-formed embedded PAN, and the published check-character algorithm. A pass means the GSTIN is internally consistent. Confirm registration status on the GST portal (Search Taxpayer).
GSTIN structure
A Goods and Services Tax Identification Number is 15 characters and, unlike an Aadhaar number, every part of it means something:
| Characters | Content | Example (27AAPFU0939F1ZV) |
|---|---|---|
| 1 – 2 | State code (census code of the state of registration) | 27 = Maharashtra |
| 3 – 12 | PAN of the business | AAPFU0939F (F = firm) |
| 13 | Entity number for this PAN in this state (1–9, then A–Z) | 1 = first registration |
| 14 | Always Z (reserved) | Z |
| 15 | Check character | V |
Regex for the structure: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$. Because it embeds a PAN, the PAN rules apply to characters 3–12 as well.
The GSTIN checksum algorithm
The 15th character is computed from the first 14 using base-36 arithmetic. Each character is converted to a value 0–35 (digits then A–Z), multiplied by 1 or 2 depending on position, and the digit sum of the product in base 36 is accumulated. The check character makes the total divisible by 36.
const CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
function gstinCheckChar(first14) {
let sum = 0;
for (let i = 0; i < 14; i++) {
const value = CHARS.indexOf(first14[i]);
const factor = i % 2 === 0 ? 1 : 2;
const product = value * factor;
sum += Math.floor(product / 36) + (product % 36);
}
return CHARS[(36 - (sum % 36)) % 36];
}
function isValidGSTIN(input) {
const s = String(input).toUpperCase().replace(/\s/g, '');
return /^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/.test(s)
&& gstinCheckChar(s.slice(0, 14)) === s[14];
}
// isValidGSTIN('27AAPFU0939F1ZV') === true
GST state code list
| Code | State / Union Territory |
|---|---|
| 10 | Bihar |
| 11 | Sikkim |
| 12 | Arunachal Pradesh |
| 13 | Nagaland |
| 14 | Manipur |
| 15 | Mizoram |
| 16 | Tripura |
| 17 | Meghalaya |
| 18 | Assam |
| 19 | West Bengal |
| 20 | Jharkhand |
| 21 | Odisha |
| 22 | Chhattisgarh |
| 23 | Madhya Pradesh |
| 24 | Gujarat |
| 25 | Daman and Diu |
| 26 | Dadra and Nagar Haveli and Daman and Diu |
| 27 | Maharashtra |
| 28 | Andhra Pradesh (old code) |
| 29 | Karnataka |
| 30 | Goa |
| 31 | Lakshadweep |
| 32 | Kerala |
| 33 | Tamil Nadu |
| 34 | Puducherry |
| 35 | Andaman and Nicobar Islands |
| 36 | Telangana |
| 37 | Andhra Pradesh |
| 38 | Ladakh |
| 97 | Other Territory |
| 99 | Centre Jurisdiction |
| 01 | Jammu and Kashmir |
| 02 | Himachal Pradesh |
| 03 | Punjab |
| 04 | Chandigarh |
| 05 | Uttarakhand |
| 06 | Haryana |
| 07 | Delhi |
| 08 | Rajasthan |
| 09 | Uttar Pradesh |
Code 28 was used for undivided Andhra Pradesh; new registrations in Andhra Pradesh use 37 and Telangana uses 36. Code 26 covers the merged UT of Dadra and Nagar Haveli and Daman and Diu. 97 is for other territory and 99 for Centre jurisdiction.
How to verify a GSTIN officially
- Go to the GST portal (gst.gov.in) and open Search Taxpayer → Search by GSTIN/UIN.
- Enter the GSTIN and captcha.
- Check that the legal name, trade name and status (Active / Cancelled) match the invoice or supplier you are dealing with.
A checksum pass plus a matching name on the portal is what you need before claiming input tax credit on a supplier's invoice.
Frequently asked questions
What is the format of a GSTIN?
A GSTIN is 15 characters: a 2-digit state code, the 10-character PAN of the business, a 1-character entity number for that PAN within the state, the letter Z, and a check character computed from the first 14.
Can a GSTIN checksum be verified offline?
Yes. Unlike PAN, the GSTIN check character uses a published algorithm (a weighted base-36 modulus), so any tool can confirm the number is internally consistent without contacting the GST portal.
How do I verify a GSTIN on the GST portal?
Open gst.gov.in, choose Search Taxpayer, then Search by GSTIN/UIN, and enter the number with the captcha. The portal shows the legal name, registration status and date, and the taxpayer type.
What does the 13th character of a GSTIN mean?
It counts registrations for the same PAN within the same state: 1 for the first registration, 2 for the second, and so on up to 9, then A to Z.
Which GST state code is 27, 29, 07 or 33?
27 is Maharashtra, 29 Karnataka, 07 Delhi and 33 Tamil Nadu. The full list of GST state codes is on this page.