Curious Minds

Clear answers to science and history questions

GSTIN Number for Testing in West Bengal

· 6 min read · Science

There is no official "test" GSTIN for West Bengal; testers use a fake 15-character number that passes only the checksum format, never a real one.

A GSTIN is a 15-character identifier issued by the GST system, and no government body publishes sample or dummy numbers for developers. Anyone typing "west bengal gstin number for testing" wants a string that looks valid in a form, sandbox or demo. The safe approach is to generate a format-valid fake number yourself, starting with state code 19 for West Bengal, and never to use a real taxpayer's GSTIN in test data.

This page explains the structure of the number, how the check digit works, how to build a test GSTIN, and where testers go wrong.

What the 15 Characters of a GSTIN Mean

Every GSTIN follows the same fixed layout, and each block has a job. Knowing the blocks lets you build a number that a validator will accept as correctly formed.

  • Characters 1-2: the state code. West Bengal is 19. This is the only part that ties the number to a state.
  • Characters 3-12: the taxpayer's PAN, ten characters in the standard PAN pattern of five letters, four digits and one letter.
  • Character 13: the entity number for that PAN within the state, from 1 to 9, then A to Z for further registrations.
  • Character 14: the letter Z by default.
  • Character 15: a check character, either a digit or a letter, calculated from the first fourteen.

So a West Bengal GSTIN always starts with 19 and always has Z in position 14. If a test number starts with anything else, it is not a West Bengal number, whatever the label on the form says.

Building a Fake West Bengal GSTIN That Passes Validation

A form that checks only length and pattern will accept almost any well-shaped string. A form that checks the fifteenth character will reject a number you invented carelessly. Build the number in two stages.

Stage one: a well-shaped string

Start with 19, add a PAN-shaped block, add an entity character, add Z. A string like 19ABCDE1234F1Z1 has the right shape: two digits, five letters, four digits, one letter, one alphanumeric, Z, one alphanumeric. Use obviously fake letters and digits so nobody mistakes it for a live registration. Avoid copying a PAN you found in a document, a invoice or a public filing.

Stage two: the check character

The fifteenth character is computed, not chosen. The standard method assigns each of the first fourteen characters a value, multiplies alternating positions by 1 and 2, sums the digits of each product, and takes the remainder when divided by 36. That remainder maps to 0-9 then A-Z. A validator that implements this will reject a random final character.

Two practical routes exist. Either use a test library in your codebase that generates and validates GSTINs, or take a known-valid published example from the official GST documentation and change only characters that do not affect the check logic. Never publish a generated test number without labelling it as fictitious.

A Worked Example With Round Numbers

Suppose a developer needs five West Bengal test records for a billing screen. Build them from one fake PAN block and vary the entity character.

Test recordGSTIN stringWhat it checks
119AAAAA0001A1Z5Basic format, state code 19
219AAAAA0001A2Z3Second registration under the same PAN
319AAAAA0001A3Z1Entity character 3
419AAAAA0001A4Z9Entity character 4
519AAAAA0001A5Z7Entity character 5

The final characters above are illustrative only. Run each string through your own validator before use, and replace any that fail. The point of the table is the pattern: same PAN block, different entity character, same state code, same Z. That gives you a family of test records that exercise the entity field without inventing a new taxpayer each time.

For a negative test, drop one character, change the state code to 99, or replace the Z with a digit. Each should fail, and each failure should produce a different error message in a well-built form.

Why Real GSTINs Must Stay Out of Test Data

A GSTIN is linked to a real business and appears on invoices, returns and registration records. Putting a real one into a demo, a screenshot, a public repository or a training video exposes that business's identifier to anyone who looks. The number alone does not give access to filings, but it is still personal business data and should be treated that way.

The same applies to PAN. A GSTIN contains the holder's PAN in characters 3 to 12, so a leaked test GSTIN leaks a PAN too. Use invented letter and digit blocks, and keep them clearly marked as fictitious in code comments and test fixtures.

Where Test GSTINs Usually Fail

Most rejections come from a handful of causes, and each has a direct fix.

  • Wrong state code. A number starting with 27 is Maharashtra, not West Bengal. Check the first two digits against the state list before blaming the validator.
  • Bad check character. The last character must match the calculation. Regenerate rather than guessing.
  • Lowercase letters. GSTINs are uppercase. Convert input to uppercase before validating, or reject lowercase with a clear message.
  • Spaces and hyphens. Strip them on input. A number pasted from a PDF often carries hidden spaces.
  • Wrong length. Fifteen characters exactly. A fourteen-character string is not a GSTIN, however plausible it looks.

Test each of these cases deliberately. A form that accepts a lowercase number and stores it is a form that will fail later when the number is matched against a portal record.

Checking a GSTIN Before You Trust It

For a real number, the only reliable check is the GST portal's own search, which shows whether the registration is active and what it is registered for. A format check tells you the string is well formed; it tells you nothing about whether the business exists.

For a test number, the reverse applies: the format check is all you have, and it should pass while the portal search should fail. That combination is the sign of a good test fixture.

Keep test numbers in a separate configuration file, never in production data, and give them a recognisable prefix pattern in your own records so a future developer can tell at a glance that they are invented.

Questions people ask

Is there an official dummy GSTIN for West Bengal?

No. The GST system issues numbers to registered taxpayers only and does not publish sample numbers for testing. Any "sample" you find online is someone's invention or a real business's number.

Can I use a real West Bengal GSTIN in a demo?

No. It belongs to a real business and contains that business's PAN. Use an invented string with state code 19 instead.

Does the check character matter for testing?

It matters if your validator implements the check. Build the number with a generator or a library so the fifteenth character is correct, and test the failure case separately.

In this article
  1. What the 15 Characters of a GSTIN Mean
  2. Building a Fake West Bengal GSTIN That Passes Validation
  3. A Worked Example With Round Numbers
  4. Why Real GSTINs Must Stay Out of Test Data
  5. Where Test GSTINs Usually Fail
  6. Checking a GSTIN Before You Trust It
  7. Questions people ask