One wrong character in a GSTIN can cost you the input tax credit: how the check character catches it, and what it misses
An invoice arrives from a supplier. The goods are real, the tax is paid, the amount is right. Two months later the reconciliation says the invoice isn’t in your GSTR-2B, and the input tax credit on it can’t be claimed. Somebody calls the supplier, the supplier’s accountant looks it up, and the answer is a single character: they typed your GSTIN with a 3 where there should have been an 8.
That one character is surprisingly expensive. This post explains why the GST system is so unforgiving about it, how a GSTIN is put together, how its last character is designed to catch exactly this kind of mistake, and the one kind of slip it can’t see. The GSTIN Checker does all of these checks on one number or on a whole list, and every example below was worked out with it.
Why one wrong character costs the credit
Input tax credit in India isn’t claimed from the invoice in your hand. It is claimed from what your supplier reports. Every month (or quarter) the supplier files GSTR-1, listing each B2B invoice against the buyer’s GSTIN. The GST system then sorts those invoices by GSTIN and builds each buyer’s GSTR-2B, a statement of the credit their suppliers have reported for them.
Since 1 January 2022 that statement is not just a convenience. Section 16(2)(aa) of the CGST Act makes it a condition of the credit: you can only take credit on an invoice whose details the supplier has furnished in GSTR-1 and that have been communicated to you, which in practice means the invoice shows up in your GSTR-2B. An invoice reported against the wrong GSTIN is, as far as the system is concerned, somebody else’s invoice.
What happens next depends on the typo:
- The wrong number doesn’t exist. The GST portal checks the recipient GSTINs in a GSTR-1 against its register, so a number that was never issued is normally refused when the invoice is entered or uploaded. Annoying, but at least somebody notices that day.
- The wrong number belongs to someone else. Then nothing complains. The invoice lands in a stranger’s GSTR-2B, the stranger probably ignores it, and you find out at reconciliation, or when a notice asks why your credit exceeds what your 2B supports.
The fix is an amendment in a later GSTR-1, which only the supplier can file, and which has a deadline: errors in a year’s GSTR-1 can be corrected only up to 30 November after that financial year ends (or the date the annual return is filed, if earlier). Credit itself has the same 30 November limit under section 16(4). A typo noticed in December on a March invoice can therefore mean credit you will never get back, for a mistake you didn’t make.
So the useful moment to catch a bad GSTIN is before it is used: when a vendor is added to your books, when a customer’s number goes onto an invoice, when a purchase register is imported. That is what the number’s own structure is for.
What a GSTIN is made of
A GSTIN has 15 characters, and only the last one is a checksum. Take the invented number 29ABCPZ0000A1ZA:
| Characters | Here | Meaning |
|---|---|---|
| 1–2 | 29 | State code: Karnataka. The codes are the Census of India’s state codes, from 01 Jammu and Kashmir to 38 Ladakh, plus 97 Other Territory and 99 Centre Jurisdiction. |
| 3–12 | ABCPZ0000A | The holder’s PAN. Its 4th letter says what kind of holder it is: P for an individual, C a company, F a firm or LLP, H a Hindu undivided family, T a trust, and a few more. |
| 13 | 1 | Which registration this is for the same PAN in the same state: 1 to 9, then A to Z, so up to 35. |
| 14 | Z | Z for a regular registration. Tax deductors have D here and e-commerce operators collecting tax have C. |
| 15 | A | The check character, computed from the other 14. |
A lot can go wrong before the checksum even comes into it. A state code that doesn’t exist (45, say, or 28, which was undivided Andhra Pradesh’s code before 2014 and never started a GSTIN: Andhra Pradesh numbers start 37). A PAN with a letter where a digit belongs. A PAN whose 4th letter isn’t a holder type at all. A 0 as the 13th character, which never happens because counting starts at 1. The checker reports each of these in words, position by position, because “invalid GSTIN” on its own sends people back to stare at the number.
The state codes also carry a little history. In 2020 Dadra and Nagar Haveli (26) and Daman and Diu (25) were merged into one union territory under code 26, and the Daman and Diu taxpayers were given new GSTINs starting 26 from 1 August 2020. A number starting 25 is therefore real but old, and the checker says so rather than calling it wrong. Ladakh got its own code, 38, when it became a union territory; before that its businesses were registered under Jammu and Kashmir’s 01.
How the check character is worked out
The 15th character is a Luhn checksum, the same idea as the last digit of a credit card number, stretched from base 10 to base 36 so it can cover letters. Every character gets a value: the digits 0 to 9 are themselves, A is 10, B is 11 and so on up to Z at 35. Then:
- Multiply the first 14 values alternately by 1 and 2, starting with 1.
- Write each product in base 36 and add its two digits, which is the product divided by 36 plus the remainder. A product of 50 gives 1 + 14 = 15; a product of 70 gives 1 + 34 = 35.
- Add the 14 results.
- The check character is whatever brings the total up to the next multiple of 36.
For 29ABCPZ0000A1Z the values are 2, 9, 10, 11, 12, 25, 35, 0, 0, 0, 0, 10, 1, 35. With the weights applied the contributions are 2, 18, 10, 22, 12, 15 (from 50), 35, 0, 0, 0, 0, 20, 1 and 35 (from 70), which add up to 170. 170 is 26 past a multiple of 36 (144), so the check needs 10 more, and the character worth 10 is A. Hence 29ABCPZ0000A1ZA.
Change the last character to X and the checker answers: the check character is X, but the first 14 characters give A. It then shows the number that would follow, 29ABCPZ0000A1ZA, with a caveat that matters: if the first 14 are right. The checksum only knows that something is wrong, not where. If the typo is in the PAN, the right check character is something else again, so compare against the supplier’s registration certificate or the GST portal before “fixing” the last character to make the warning go away.
What the check character catches
The claim usually made about checksums like this is that they catch “almost all” typos. It is worth being exact, because the exceptions are where real mistakes slip through. I tested the checker’s own code against invented GSTINs; these are the results, and the test that produces them is part of the tool’s test suite.
Every single wrong character is caught. Not almost every: every one. For 40 numbers, every position was replaced by each of the 35 other characters, 21,000 typos in all, and not one passed. There is a short reason it can’t: with weight 1 a character’s contribution is its own value, and with weight 2 it is 2x for values up to 17 and 2x − 35 above, so no two characters ever contribute the same amount at the same position. Change one character and the total must change, and so must the check. A useful consequence: a one-character typo can never turn your GSTIN into another valid GSTIN, so it can never quietly land on a stranger’s registration. It will be refused at upload, or flagged by any checker.
Swapping two neighbours is caught, with one blind spot. Typing BA for AB is the other classic slip. Out of 4,002 such swaps across 300 numbers, the check character alone caught 3,995, or 99.83%. The seven it missed are always the same pair: 0 and Z side by side. Z happens to contribute 35 at either weight (35 × 2 = 70, and 1 + 34 = 35) and 0 contributes nothing, so swapping them leaves the total where it was. But a Z where the PAN needs a digit, or a 0 where it needs a letter, breaks the format, so the full check, format plus checksum, caught all 4,002.
Two separate mistakes mostly are. With two characters wrong at random, the check character catches 97.1% of the 30,000 cases tried. The format rules bring that to 99.4%. The remaining fraction is the price of a single check character: with 36 possible values, about one random error pattern in 36 will happen to land on the right one.
The one slip it can’t see
Here is the weakness, and it is structural. The weights go 1, 2, 1, 2… so characters two places apart carry the same weight. Swap them and every contribution stays where it was; the total doesn’t move; the check character still fits. Out of 3,770 swaps of characters one place apart, the check character caught exactly none.
Take 29ABCPZ1234A1ZW. Swap the 1 and the 3 in the PAN’s digits, as you might reading a number aloud, and you get 29ABCPZ3214A1ZW, which is a perfectly valid GSTIN with a different PAN. No checker working from the number alone can flag it. The format rules do catch such swaps when they move a letter into a digit’s place or the other way round, and in the test they caught 58.0% of them, but swaps within the four PAN digits or between two letters of the PAN get through untouched.
Compare the neighbouring swap of the same digits: 29ABCPZ1324A1ZW fails at once, and the checker says the first 14 characters call for an X. So the honest summary is: a GSTIN checker catches every single wrong character and every neighbour swap, and misses swaps one place apart within the same kind of character. That last case is exactly why a passing check isn’t the same as the right number, and why the supplier’s certificate or the portal is still the final word for a new vendor.
Look-alike characters and a missing last character
Two other mistakes come up so often that the checker handles them specially.
The first is the letter O typed for the digit 0, or I for 1, usually when a number is copied from a scanned invoice or read over the phone. 29ABCPZOOOOA1ZA fails because characters 8 to 11 should be digits; the checker says exactly that, marks the four characters in red, and because swapping them for zeros gives a number that passes every check, it asks: did you mean 29ABCPZ0000A1ZA? It only offers this when the swapped number is fully valid, and only for O/0 and I/1 in positions where one kind is required.
The second is a 14-character number, typically from a spreadsheet column that was a character too narrow. If the 14 characters are otherwise fine, the checker works out the missing check character and shows the full number it would make, 29ABCPZ0000A1Z becoming 29ABCPZ0000A1ZA, again with the same caveat: it is only right if those 14 are.
Checking a whole vendor list
The single-number card is for the moment someone reads a GSTIN to you. The more valuable use is the list. Paste a column straight from a vendor master, a purchase register or a sales report: one number per line, or separated by commas, semicolons or spaces. Up to 500 numbers are checked at once, and spaces or hyphens inside a number, lower case and a leading “GSTIN:” label are all tidied away.
Each number gets a row with its status, its state, its PAN and holder type, and the first problem in a few words (“check character wrong: should end in A”, “character 14 should be Z”, “unknown state code 45”). Above the table is a count of valid, invalid and repeated numbers; duplicates are flagged against the row they repeat, which turns up the same supplier entered twice under slightly different names. A checkbox hides the clean rows so only the ones needing attention remain.
Download CSV saves the result with every decoded field (state code and name, PAN, holder type, registration number, the check character given and the one expected, and every problem in full) for a spreadsheet. Spreadsheet formulas typed into the list are defused with a leading apostrophe, so a stray cell starting with = can’t run when the file is opened. Lists of up to 100 numbers can also be shared as a link, which reopens the same check; longer lists would make links too long for some servers, so they are kept to the CSV.
The numbers that aren’t PAN-based
Not every GSTIN is a state code and a PAN, and a checker that assumes so will reject real registrations. The tool recognises these:
- Tax deductors under section 51 (largely government departments) have D as the 14th character, and often a TAN, the tax deduction account number (four letters, five digits, a letter), where the PAN would be.
- E-commerce operators collecting tax under section 52 have C as the 14th character.
- UINs for embassies, consulates and UN bodies follow another layout: state code, a two-digit year, a three-letter country code, a five-digit serial, then UN (or ON for other notified persons) and the check character.
- Foreign suppliers of online services (OIDAR) use the same layout with OS as the type, under state code 99.
All of these use the same check character, so a typo in them is caught just the same. When a number follows the foreign layout with a type code the checker doesn’t know, or has a 14th character other than Z, D or C but a correct check character, it says “format not checked” instead of “invalid”: the check character makes a typo very unlikely, and the rules for that kind of registration aren’t published, so calling it wrong would be a guess.
What no offline check can tell you
Everything above comes from the characters themselves. The checker never asks the GST portal, partly by design (it answers instantly, for 500 numbers, without a login) and partly because it can’t: the portal’s Search Taxpayer page wants a captcha for every lookup, and its API is for GST Suvidha Providers with their own credentials.
So it can’t tell you whether a number is registered, active, suspended or cancelled, or whose it is. A number that passes every check may never have been issued, and a cancelled registration has a perfectly valid check character. For a new vendor, or before a large purchase, look the number up on the portal’s Search Taxpayer page and compare the legal name with the invoice.
A short routine that saves the arguments
- Check at entry, not at reconciliation. Run new vendor and customer GSTINs through a checker when they go into your books. A typo found then costs nothing.
- Check the whole master once. Paste your vendor list, download the CSV, and fix the red rows. Repeated numbers are worth a look too.
- Don’t “fix” a check character blindly. If only the 15th character disagrees, the first 14 may still be the problem. Confirm against the registration certificate or the portal.
- Watch the swaps it can’t see. A passing check doesn’t rule out two digits swapped one place apart. For a new vendor, the portal lookup and the legal name settle it.
- Check your own GSTIN on the invoices you receive. If a supplier mistypes it, the credit is yours to lose. Ask for a corrected invoice and an amended GSTR-1 well before 30 November.
One character in fifteen is a small thing to get wrong and an expensive thing to fix late. The check character was built so that most of those mistakes announce themselves; the GSTIN Checker makes sure you hear them, and tells you plainly when it can’t.