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.
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”.
| Positions | Example | What it is |
|---|---|---|
| 1-2 | 27 | State code: 27 is Maharashtra in the GST portal's list. |
| 3-12 | AAATI1446A | PAN: 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. |
| 13 | 1 | Entity 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. |
| 14 | Z | Z 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. |
| 15 | 7 | Check 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:
- Give each character a value: 0 to 9 for the digits and 10 to 35 for A to Z.
- Multiply the 14th character by 2, the 13th by 1, the 12th by 2, and so on, alternating, back to the first.
- Divide each product by 36 and add the quotient and the remainder to the sum.
- 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
| Code | State or Union territory |
|---|---|
| 01 | Jammu and Kashmir |
| 02 | Himachal Pradesh |
| 03 | Punjab |
| 04 | Chandigarh |
| 05 | Uttarakhand |
| 06 | Haryana |
| 07 | Delhi |
| 08 | Rajasthan |
| 09 | Uttar Pradesh |
| 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 |
| 26 | Dadra and Nagar Haveli and Daman and Diu |
| 27 | Maharashtra |
| 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 |
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
- Whether the GSTIN is registered, active, suspended or cancelled, and the name it belongs to: search it on the GST portal.
- Whether the PAN exists or matches the name on the invoice.
- Whether the supplier files its returns.
- GST portal: Search TaxpayerStatus, name, address and return filing of a GSTIN.
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.
- India GST for OdooOur module for Odoo 17 to 20: GSTIN on contacts and products, CGST and SGST or IGST depending on the supplier's and the customer's State, input tax credit, and GSTR-1 and GSTR-3B preparation with deadline alerts. With a FlexigoTech Cloud subscription: €29 a month or €290 a year plus VAT, with a 14-day free trial, and €9 per Odoo version.
- Odoo in IndiaWhat Odoo brings for India, and our implementation: a free 30-minute session with an engineer, then 4 to 8 weeks of work, or 10 to 14 with a large migration.
- Book a callTell us how you invoice today and we will tell you what Odoo covers.
More free tools for India
- HSN code finderHSN and SAC codes, with the GST rate from the CBIC notifications.
- GST calculatorAdd or remove GST, split into CGST and SGST or IGST.
Sources
- GST portal: the check character, function checkGstn in static.gst.gov.in/uiassets/js/common/directives2.0.js; the formats of the taxpayer search, in static.gst.gov.in/uiassets/js/services/searchtpCtrl1.0.js; the State codes, usermaster.gst.gov.in/master/states. Read on 26-11-2026.
- GST Council, leaflet “Registration under GST Law”, gstcouncil.gov.in.
- Central Goods and Services Tax Act, 2017, sections 25(6) and 25(9), from the CBIC portal (taxinformation.cbic.gov.in).
- 16 registration certificates and pages of public bodies on their own websites, among them IIT Delhi (rti.iitd.ac.in), IIT Bombay (iitb.ac.in) and the University of Agricultural Sciences, Bangalore (uasbangalore.edu.in), read on 26-11-2026.
- Odoo source code, branches 17.0 to 20.0, read on 26-11-2026: check_vat_in (base_vat in 17 to 19, the base module in 20), l10n_in_gstin_status (18) and l10n_in (19 and 20).
A free tool from FlexigoTech. We build modules and connectors for Odoo.
