Curious Minds

Clear answers to science and history questions

Sample GSTIN for Testing and GST Number Format

· 4 min read · Science

A sample GSTIN for testing follows the 15-digit alphanumeric format, such as 07AAAAA0000A1Z5, to validate tax software logic.

A Goods and Services Tax Identification Number (GSTIN) is a unique 15-digit identifier assigned to every registered business under the GST regime. Developers and accountants use sample GSTINs to test the validation logic of billing software, ERP systems, and API integrations without using real taxpayer data.

GSTIN Structure and Digit Logic

The GSTIN is not a random string of characters. It follows a strict mathematical and geographic structure defined by the Government of India to ensure every number is unique and traceable.

The 15 digits are divided into five distinct parts:

  • Digits 1 and 2: The State Code. This two-digit number represents the state or union territory where the business is registered. For example, 07 is the code for Delhi and 27 is for Maharashtra.
  • Digits 3 to 12: The PAN. This 10-character alphanumeric string is the Permanent Account Number of the business entity or the proprietor.
  • Digit 13: The Entity Code. This single character identifies the number of registrations the business has within the same state under the same PAN. It usually starts with '1' for the first registration.
  • Digit 14: The Default Character. This is currently the letter 'Z' for most taxpayers.
  • Digit 15: The Checksum Digit. This final character is a checksum digit (can be a number or letter) used by the system to detect entry errors.

Validating GSTINs With a Worked Example

To test if a GSTIN is formatted correctly, you must check each segment against the rules above. If any segment is missing or exceeds the character limit, the system should reject it.

Consider a hypothetical business registered in Delhi with a PAN of ABCDE1234F. The resulting GSTIN would be constructed as follows:

  1. State Code for Delhi: 07
  2. PAN of the entity: ABCDE1234F
  3. First registration in the state: 1
  4. Default character: Z
  5. Checksum character: 5 (calculated by the system)

The complete test GSTIN is 07ABCDE1234F1Z5.

When testing software, you should input strings that intentionally break these rules to ensure the error handling works. Try entering 14 digits instead of 15, or using a state code like '99' which does not exist in the official list provided by the GST Network.

GSTIN Format Requirements Table

Position Content Type Example
1-2 State Code Numeric 07, 27, 33
3-12 PAN Alphanumeric ABCDE1234F
13 Entity Code Alphanumeric 1, 2, 3
14 Default Char Alphabetic Z
15 Checksum Alphanumeric 5, A, K

Common GSTIN Validation Misconceptions

A common misconception is that any 15-digit alphanumeric string is a valid GSTIN. In reality, a string can be syntactically correct but factually invalid.

Syntactic validation only checks if the string has 15 characters and follows the alphanumeric pattern. Factual validation requires an API call to the GST portal to check if that specific GSTIN is active, suspended, or cancelled. For testing purposes, a syntactically correct number is usually sufficient to test UI fields, but you need a real, active GSTIN to test the "Get Taxpayer Details" API functionality.

Another error is assuming the 13th digit is always '1'. While most small businesses have only one registration, larger companies with multiple branches in one state will have digits 2, 3, or higher in the 13th position.

Questions people ask

Can I use a fake GSTIN for official invoices?

No. Using a fake or sample GSTIN on a legal tax invoice is a violation of the GST Act. Invoices must contain the actual GSTIN of the supplier and the recipient to claim Input Tax Credit (ITC). The Income Tax Department and GST authorities use these numbers to cross-verify sales and purchase data.

How do I find the state code for my GSTIN?

State codes are standardized across India. You can find the full list of 37 state and union territory codes on the official GST portal. For instance, Jammu and Kashmir is 01, while Telangana is 36. If your GSTIN starts with a code not on the official list, the number is invalid.

What happens if the checksum digit is wrong?

The checksum digit is calculated using a specific formula (similar to the Modulo 37 algorithm) that considers all previous 14 characters. If a single character is mistyped, the checksum will not match. Most professional accounting software will immediately flag the GSTIN as "Invalid Format" without even connecting to the internet because the checksum fails.

Is the PAN inside the GSTIN always the same?

Yes, the 3rd through 12th characters of the GSTIN are exactly the PAN of the business owner or the company. If you know the PAN of a business, you can easily identify the core of their GSTIN. This link ensures that the tax identity is tied to the permanent tax identity of the entity.

Does the GSTIN change if a business moves to another state?

Yes. Because the first two digits are the State Code, a business moving its principal place of business to a different state must apply for a new GST registration in that state. This results in a new GSTIN with a different state code, even though the PAN (digits 3-12) remains the same.

In this article
  1. GSTIN Structure and Digit Logic
  2. Validating GSTINs With a Worked Example
  3. GSTIN Format Requirements Table
  4. Common GSTIN Validation Misconceptions
  5. Questions people ask