GSTIN Validator

Verify a GST Identification Number's checksum, decode its state and PAN, and look up any GST state code — instantly, without the number leaving your device.

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:

CharactersContentExample (27AAPFU0939F1ZV)
1 – 2State code (census code of the state of registration)27 = Maharashtra
3 – 12PAN of the businessAAPFU0939F (F = firm)
13Entity number for this PAN in this state (1–9, then A–Z)1 = first registration
14Always Z (reserved)Z
15Check characterV

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.

JavaScript
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

CodeState / Union Territory
10Bihar
11Sikkim
12Arunachal Pradesh
13Nagaland
14Manipur
15Mizoram
16Tripura
17Meghalaya
18Assam
19West Bengal
20Jharkhand
21Odisha
22Chhattisgarh
23Madhya Pradesh
24Gujarat
25Daman and Diu
26Dadra and Nagar Haveli and Daman and Diu
27Maharashtra
28Andhra Pradesh (old code)
29Karnataka
30Goa
31Lakshadweep
32Kerala
33Tamil Nadu
34Puducherry
35Andaman and Nicobar Islands
36Telangana
37Andhra Pradesh
38Ladakh
97Other Territory
99Centre Jurisdiction
01Jammu and Kashmir
02Himachal Pradesh
03Punjab
04Chandigarh
05Uttarakhand
06Haryana
07Delhi
08Rajasthan
09Uttar 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

  1. Go to the GST portal (gst.gov.in) and open Search Taxpayer → Search by GSTIN/UIN.
  2. Enter the GSTIN and captcha.
  3. 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.