Skip to main content

GSTIN check: format and check digit

Type a GSTIN to check its format and its 15th character, the check character, worked out the way the GST portal does. A single wrong character always breaks the check character, and two swapped neighbours almost always do. This page does not tell you whether the GSTIN is registered or active: the taxpayer search on the GST portal does.

15 characters. Spaces, dots and hyphens are ignored, and small letters count as capitals.

The check runs in your browser. The GSTIN is not sent anywhere and is not stored.

How a GSTIN is built

The GST Council's leaflet on registration says it in one line: “first 2 digits of the GSTIN is the State code, next 10 digits are the PAN of the legal entity, the next two digits are for entity code, and the last digit is check sum number”.

The 15 characters of 27AAATI1446A1Z7, the GSTIN of IIT Bombay in Maharashtra
PositionsExampleWhat it is
1-227State code: 27 is Maharashtra in the GST portal's list.
3-12AAATI1446APAN: 5 letters, 4 digits and a letter. A tax deductor can register with its TAN instead (CGST Act, section 25(6)): 4 letters, 5 digits and a letter.
131Entity code: 1 to 9 or a letter, never 0, in the GST portal's pattern. Most of the GSTINs we read have 1; the registration certificate of 29AAAJU0068L2ZN, of the University of Agricultural Sciences, Bangalore, has 2.
14ZZ on regular registrations and D on tax deductor ones, in the registration certificates we read. The GST Council's leaflet counts positions 13 and 14 together as the entity code.
157Check character, worked out from the first 14.

How the check character is worked out

The GST portal checks it in its own JavaScript (the function checkGstn, in static.gst.gov.in/uiassets/js/common/directives2.0.js). It is a Luhn sum in base 36:

  1. Give each character a value: 0 to 9 for the digits and 10 to 35 for A to Z.
  2. Multiply the 14th character by 2, the 13th by 1, the 12th by 2, and so on, alternating, back to the first.
  3. Divide each product by 36 and add the quotient and the remainder to the sum.
  4. The check character is the one whose value is 36 minus the remainder of the sum divided by 36, or 0 if that remainder is 0.

For 27AAATI1446A1Z7 the sum is 173. 173 divided by 36 leaves 29, and 36 − 29 = 7, so the check character is 7. Z (35) at position 14 gives 35 × 2 = 70, which is 1 × 36 + 34, so it adds 1 + 34 = 35.

We tested the page on 16 GSTINs that public bodies publish on their own websites, most of them on their registration certificate (Form GST REG-06): from 13 States and Union territories, regular and tax deductor registrations, with a PAN or with a TAN. All 16 pass, and any change of one character in the first 14 makes the check fail.

State codes

State codes in the GST portal’s list (37)
CodeState or Union territory
01Jammu and Kashmir
02Himachal Pradesh
03Punjab
04Chandigarh
05Uttarakhand
06Haryana
07Delhi
08Rajasthan
09Uttar Pradesh
10Bihar
11Sikkim
12Arunachal Pradesh
13Nagaland
14Manipur
15Mizoram
16Tripura
17Meghalaya
18Assam
19West Bengal
20Jharkhand
21Odisha
22Chhattisgarh
23Madhya Pradesh
24Gujarat
26Dadra and Nagar Haveli and Daman and Diu
27Maharashtra
29Karnataka
30Goa
31Lakshadweep
32Kerala
33Tamil Nadu
34Puducherry
35Andaman and Nicobar Islands
36Telangana
37Andhra Pradesh
38Ladakh
97Other Territory

The list is the one the GST portal uses (usermaster.gst.gov.in/master/states, read on 26 November 2026). Codes 25 and 28 are not in it.

Other kinds of GST numbers

The taxpayer search on the GST portal also accepts numbers with other formats: tax collectors (C at position 14), Unique Identity Numbers of UN bodies, embassies and others (CGST Act, section 25(9)), non-resident taxable persons, suppliers of online services from outside India, and three other kinds of ID. This page recognises those formats and says so, but it does not check their check character, because we found no published numbers of those kinds to test it on.

What it does not check

GSTIN in Odoo

Odoo 17, 18, 19 and 20 check the format of a GSTIN on contacts against six patterns (regular, UN bodies, non-resident, tax deductor with D or K, tax collector with C), but not the check character. Odoo 18, with the module “Indian - Check GST Number Status”, and Odoo 19 and 20, in Indian Accounting once the company setting “Check GST Number Status” is on, add a button that asks the GST network for the status of a contact's GSTIN through Odoo's paid service (IAP credits). We read this in Odoo's source code for each version on 26 November 2026.

More free tools for India

Sources

A free tool from FlexigoTech. We build modules and connectors for Odoo.