GSTIN number format: structure, PAN linkage, and check digit

The Goods and Services Tax Identification Number (GSTIN) follows a strict 15-digit alphanumeric structure consisting of a 2-digit state code, the 10-character PAN, a 1-character entity code, the default letter Z, and a mathematical check digit. This format links every state registration directly to the underlying business entity and prevents data entry mistakes through the Luhn mod 36 checksum. Validating this format during purchase booking ensures your inward invoices reconcile accurately against Form GSTR-2B.

When an accounts team enters a new vendor master or books inward invoices, mistyping a single character in the supplier GSTIN causes downstream reconciliation failures. An incorrect GSTIN means the invoice will not match against your monthly Form GSTR-2B download, preventing input tax credit claims under Section 16(2)(aa) of the CGST Act. Understanding the exact breakdown of the 15-character identifier helps accountants spot errors before saving vendor records in their ERP systems.

The 15-digit GSTIN structure explained

The GSTIN structure was designed by the Goods and Services Tax Network (GSTN) to encode business identity, jurisdiction, and multi-unit counts into a single string. The composition follows five distinct segments across the 15 positions:

PositionLengthCharacter typeField meaningExample value
1 to 22NumericState code (Census 2011 standard)27 (Maharashtra)
3 to 1210AlphanumericPermanent Account Number (PAN)AABCS1429B
131AlphanumericEntity registration number within state1 (First unit)
141AlphabetDefault character reserved by GSTNZ
151AlphanumericCheck digit (Luhn mod 36 algorithm)U

The first two digits represent the State Code as assigned by the Indian Census. For example, 07 corresponds to Delhi, 24 to Gujarat, 27 to Maharashtra, and 29 to Karnataka. In the e-invoicing portal, an inconsistency between these first two digits and the state code field triggers NIC e-Invoice system error code 2265 (Recipient GSTIN state code does not match with the state code passed in recipient details).

The 10-character PAN linkage

Characters 3 through 12 contain the full Permanent Account Number of the legal person. The fourth character in the PAN identifies the entity status: C for Company, P for Person/Individual, H for Hindu Undivided Family, F for Firm or Limited Liability Partnership, A for Association of Persons, and T for Trust. The fifth character represents the first letter of the taxpayer surname (for individuals) or entity legal name.

Entity code for multi-branch operations

Character 13 assigns an entity number representing the count of registrations obtained by the same PAN within the same State or Union Territory. The first registration gets 1. Additional registrations within the same state (such as separate business verticals or SEZ units) receive 2 through 9, followed by alphabetical characters A through Z for further registrations. Under Section 25(4) of the CGST Act, each separate registration held by the same entity across different states or within the same state constitutes a distinct person for all GST compliance obligations.

Common mistake: Booking purchases against the head office GSTIN when the invoice was billed by a distinct person branch unit. Even if both units share the same 10-digit PAN, the invoice will only appear in the GSTR-2B corresponding to the specific 15-digit GSTIN stated on the invoice.

How the Luhn mod 36 check digit works

The 15th character of the GSTIN is a mathematical verification code calculated from the preceding 14 characters. The GSTN system uses a base-36 variation of the Luhn algorithm (using numbers 0 to 9 with values 0 to 9, and letters A to Z with values 10 to 35). This algorithm detects single-character entry errors and most transposition errors (such as swapping adjacent numbers or letters).

The mathematical steps to determine the 15th character are as follows:

  1. Map characters to base 36 values: Characters 0 to 9 map to numerical values 0 to 9. Characters A through Z map to values 10 through 35.
  2. Apply alternating weight factors: Multiply the value of each character at odd positions (1, 3, 5, 7, 9, 11, 13) by factor 1, and each character at even positions (2, 4, 6, 8, 10, 12, 14) by factor 2.
  3. Sum quotient and remainder: For each product, calculate the quotient when divided by 36 and the remainder (product mod 36). Add the quotient and the remainder together to get a factor sum.
  4. Calculate checksum: Add the factor sums for all 14 characters. Compute the remainder of this total when divided by 36. Subtract this remainder from 36 to get the check value. If the check value equals 36, the check value is 0. Convert this check value back to its base 36 character.
14 Characters → Map Base 36 → Multiply Weights 1 and 2 → Sum Digits Mod 36 → 15th Check Character

Worked example: calculating check digit and preventing ITC block

Consider an accounting team receiving an invoice from vendor XYZ Enterprises for an inward supply of taxable machinery spare parts. The invoice particulars are:

  • Taxable value: ₹1,00,000
  • Applicable tax rate: 18% Integrated Goods and Services Tax (IGST)
  • Calculated tax amount: ₹1,00,000 × 18% = ₹18,000
  • Total invoice value: ₹1,00,000 + ₹18,000 = ₹1,18,000

The vendor first 14 characters are 27AABCS1429B1Z. Let us compute the official 15th check digit step by step:

PosCharValue (V)Weight (W)Product (P = V × W)Quotient (q = P / 36)Remainder (r = P % 36)Term (q + r)
12212022
27721401414
3A1011001010
4A1022002020
5B1111101111
6C1222402424
7S2812802828
81122022
94414044
102224044
119919099
12B1122202222
131111011
14Z3527013435

Sum of terms = 2 + 14 + 10 + 20 + 11 + 24 + 28 + 2 + 4 + 4 + 9 + 22 + 1 + 35 = 186.

Remainder = 186 % 36 = 6.

Check digit value = (36 - 6) % 36 = 30.

In base 36 (where 10 is A, 11 is B, up to 35 as Z), numerical value 30 corresponds to the letter U. Thus, the complete valid GSTIN is 27AABCS1429B1ZU.

If an entry operator types 27AABCS1429B1Z5 instead of ending in U, or records the Gujarat branch 24AABCS1429B1ZU by mistake, the purchase register will not match the vendor outward return. Under Rule 36(4) of the CGST Rules, no input tax credit can be availed unless the invoice is reflected in Form GSTR-2B. Here is how that entry error impacts month-end tax filing:

Booking recordInvoice amountStatus in Form GSTR-2BITC eligibilityFinancial impact
Entered as 27AABCS1429B1Z5 (Invalid check digit)₹1,18,000Unmatched (Supplier filed on 27AABCS1429B1ZU)Blocked under Rule 36(4)₹18,000 cash outflow required
Corrected to 27AABCS1429B1ZU (Valid verified GSTIN)₹1,18,000Matched in GSTR-2B Table 4(A)(5)Eligible credit₹18,000 credit set off against output tax

Verifying supplier GSTIN before booking purchases

To avoid reconciliation delays at month end, verify every supplier GSTIN using official government channels before processing purchase entries:

  1. Search on the GST Common Portal: Navigate to Search Taxpayer > Search by GSTIN / UIN on the official portal. This public tool verifies whether the registration status is Active, Cancelled, or Suspended, and shows the supplier GSTR-1 and GSTR-3B return filing history across recent periods.
  2. Confirm statutory nameboard compliance: Under Rule 18 of the CGST Rules, every registered taxable person is required to display their GSTIN on the name board exhibited at the entry of their principal place of business and additional places of business.
  3. Review the physical tax invoice: Under Rule 46 of the CGST Rules, a valid tax invoice must prominently display the consecutive serial number, date of issue, name, address, and GSTIN of both the supplier and the recipient.

For more details on resolving mismatches against supplier returns, see our GSTR-2B reconciliation and ITC matching guide.

Frequently asked questions

What is the 15-digit GSTIN number format?

The GSTIN format has 15 alphanumeric characters: 2 digits for the state code, 10 alphanumeric characters for the permanent account number (PAN), 1 alphanumeric character for the entity registration number within that state, 1 default character 'Z', and 1 checksum digit computed via the Luhn mod 36 algorithm.

Why is the 14th character of a GSTIN always Z?

Under the Goods and Services Tax Network (GSTN) specification, the 14th character was reserved as the default alphabet 'Z' for future expansion. It remains fixed as 'Z' across all standard registrations.

How does a wrong vendor GSTIN affect input tax credit?

Under Section 16(2)(aa) of the CGST Act and Rule 36(4), input tax credit can only be claimed if the invoice appears in the recipient Form GSTR-2B. If a purchase invoice is booked under an incorrect GSTIN or a distinct person unit, the purchase ledger fails automated matching against GSTR-2B, blocking credit until corrected.

Check your own GSTR-2B reconciliation

Match your purchase register against monthly GSTR-2B files instantly. Your GSTR-2B and purchase register files are read in your browser and never uploaded to any server.

Reconcile GSTR-2B →

Last checked: 3 November 2026. Sources: CBIC Tax Information Portal (CGST Act Section 16), GST Common Portal Taxpayer Search.