India GSTIN Generator
Online GSTIN generator for India tax testing and QA. Excellent for QA.
Waiting for generation...
About Goods and Services Tax Identification Number (GSTIN)
The GSTIN is a unique 15-character fiscal identification number assigned to every registered taxpayer in India under the Goods and Services Tax framework.
The layout integrates the taxpayer's 10-character PAN, prefixed by a 2-digit Indian state code, and finalized by a check digit calculated using an alternating Modulo 36 checksum.
Anatomy & Structure of the GSTIN (Goods and Services Tax Number)
The Indian GSTIN consists of 15 alphanumeric characters structured in 5 parts:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | State Code | 2 digits | Official state/territory code (01 to 37 per Indian Census) | 27 |
| 3 to 12 | Entity PAN | 10 chars | Permanent Account Number of the entity (format AAAAA9999A) | AAPFU0939F |
| 13 | Entity Registration Count | 1 char | Number of registrations in the same state (1-9, A-Z) | 1 |
| 14 | Default Character | 1 char | Fixed character 'Z' by GSTN regulations | Z |
| 15 | Check Character | 1 char | Calculated via alternating Modulo 36 algorithm | 5 |
Official Algorithm (Alternating Modulo 36 — GSTN)
GSTIN uses alternating Modulo 36 with weights [1, 2, 1, 2...]:
factor = val * (pos%2 === 0 ? 1 : 2); sum += floor(factor/36) + (factor%36); Check = (36 - (sum%36))%36
- 1. Map each character to value 0-35 (0-9=0-9, A-Z=10-35).
- 2. Use weight 1 for even positions and weight 2 for odd positions.
- 3. Multiply character value by weight: factor = val × weight.
- 4. Add to sum: floor(factor / 36) + (factor % 36).
- 5. Take remainder modulo 36 and map to final check character.
Frequently Asked Questions
How does the tool generate the integrated PAN?
The generator allows an optional user PAN. If not provided, it automatically generates a mathematically valid PAN following Indian tax format specifications.