India GSTIN check digit
For the body 27AAPFU0939F1Z the check character is V, giving the full GSTIN 27AAPFU0939F1ZV. Calculate that last character for a form or an import, or check a GSTIN a supplier sent before you store it. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Number
- 27AAPFU0939F1Z
- Calculation mode
- Compute
- Input
- 27AAPFU0939F1Z
- Check character
- V
- With check
- 27AAPFU0939F1ZV
An Indian GSTIN (Goods and Services Tax Identification Number) is a fifteen-character alphanumeric tax identifier used on invoices, e-way bills, and registration records. The last character is a check character derived from the first fourteen with a fixed base-thirty-six weighting rule, so a single mistyped letter or digit usually fails validation before the number is stored. This capability implements that official-style algorithm: map each character to a code point from zero through thirty-five, multiply by alternating factors one and two from the left, fold each product with floor division by thirty-six plus remainder, sum the hashes, and map the complementary residue back to zero through nine or A through Z. Use compute mode when you hold only the fourteen-character body and need the trailing check character for a form or master-data import; use validate mode when a partner, ERP, or user submits a full fifteen-character GSTIN and you need a clear valid flag plus the expected check character for error messages.
How the India GSTIN check character is calculated
A GSTIN is always fifteen characters when written without spaces or punctuation. The first two digits encode the state code; the next ten characters are the permanent account number (PAN) of the taxpayer in the familiar five-letter, four-digit, one-letter pattern; the thirteenth character distinguishes entities that share the same PAN; the fourteenth is typically Z for a normal taxpayer registration; and the fifteenth is the check character you must never invent by hand.
To compute that check character, take only the first fourteen characters and convert each one with the alphabet zero through nine then A through Z so that zero maps to code zero and Z maps to code thirty-five. From the left, multiply successive code points by the alternating factors one, two, one, two, and so on. For each product P, contribute floor of P divided by thirty-six plus P modulo thirty-six to a running sum.
After all fourteen positions, take the sum modulo thirty-six, subtract that remainder from thirty-six, reduce modulo thirty-six again so a zero remainder becomes check code zero, and map the resulting code back through the same alphabet. The full fifteen-character string must carry exactly that trailing character. The algorithm is deterministic and local: no GST portal network call, no taxpayer catalog lookup, and no clock.
Compared with multi-country tax-ID validators, the search intent here is narrow: people who need an India GSTIN check digit calculator for fourteen-character bodies, not a general VAT or EIN checker.
What you can do with it
Audit GSTIN columns in ERP and CRM exports
Batch-validate every fifteen-character GSTIN in a vendor or customer file and quarantine rows whose check character no longer matches the recomputed expected value.
FAQ
What is the India GSTIN check digit?
It is the fifteenth character of a GSTIN, computed with base-36 code points and alternating factors over the first fourteen characters so typing and import errors are usually caught before the identifier is stored or printed on a tax invoice.
What happens with wrong length, symbols, or bad shape?
A full GSTIN whose check character does not match returns valid false. Failed validation tasks are not billed.
Is the India GSTIN check digit tool free?
The browser tool is free and runs locally.
What do the parts of a GSTIN mean?
The first two digits are the state code, the next ten characters are the taxpayer's PAN, the thirteenth tells apart entities that share that PAN, the fourteenth is usually Z, and the fifteenth is the check character.
When should I calculate and when should I check a GSTIN?
Calculate when you only have the first fourteen characters and need the last one to complete the number. Check when someone hands you a full fifteen-character GSTIN and you want to know whether its final character fits.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/gstin-india \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"27AAPFU0939F1Z"}'const res = await fetch("https://api.kit.forhosting.com/enc/gstin-india", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"number": "27AAPFU0939F1Z"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/gstin-india",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"number": "27AAPFU0939F1Z"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/gstin-india", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"number":"27AAPFU0939F1Z"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"number":"27AAPFU0939F1Z"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/gstin-india", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"number": "27AAPFU0939F1Z"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.gstin_india",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Non-alphanumeric input, wrong lengths, and bodies that do not match the standard state-plus-PAN shape fail with invalid_input instead of silent stripping, so you never store a half-cleaned tax ID. The same pure arithmetic runs free in the browser and at the published API price.
Input contract, modes, and error behaviour
Send a number field that contains only characters A through Z and zero through nine; lowercase letters are uppercased automatically. Wrong length is an explicit error that names the mode and the length you sent—fourteen for compute, fifteen for validate—so client forms can show a precise message without guessing. Empty strings, missing number, invalid mode values, and bodies that fail the state-plus-PAN shape check fail before any weighted sum is trusted for storage and are not billed. Prefer compute when you mint or complete identifiers; prefer validate when you gate a lookup or import on a full GSTIN from a user or partner file. Spaces, dots, hyphens, slashes, and other symbols are rejected as non-alphanumeric input with invalid_input so a silently stripped value never reaches storage. Mode compute is the default: the engine requires exactly fourteen characters matching the standard GSTIN body shape (two-digit state, five-letter then four-digit then one-letter PAN segment, then two trailing body characters for entity and default), returns check_character as a single character, and returns with_check as the fifteen-character GSTIN you can print or persist. Mode validate requires exactly fifteen characters; the response reports valid true when the trailing character matches the recomputed expected_check_character and includes payload (the first fourteen characters), the given and expected check characters, and length fifteen. Alias keys such as gstin, code, and text are accepted for the same payload field so integrations that already speak “gstin” do not need a rename. Because the path is pure parse with no clock, random source, or network, the same JSON body always yields the same JSON result on the free browser tool and on the API at $0.002 per successful request.
Where GSTIN check digits fit real workflows
Accounts-payable portals validate fifteen-character GSTINs at vendor onboarding so a single transposition does not create a phantom supplier and a payment mismatch under reverse charge. Data-quality jobs walk every GSTIN column in a CRM or ERP export, call validate mode, and quarantine rows where valid is false—catching both human edits and off-by-one bugs in generators. Do not treat a passing GSTIN check as proof of active registration with the tax authority or of a specific composition scheme; it only proves the base-thirty-six check character is consistent with the fourteen-character body under the standard alternating weights. Finance and master-data teams receive fourteen-character internal taxpayer bodies and must append the official GSTIN check character before writing the identifier onto tax invoices, e-invoice payloads, or marketplace seller profiles that reject invalid GST numbers. E-commerce and B2B signup forms can recompute expected_check_character and show a friendly correction when an Indian business pastes a number with a mistyped last character.
Integration use cases
Complete a 14-character GSTIN body for invoices
Call compute mode with the fourteen-character body, store with_check, and feed the fifteen-character GSTIN into your e-invoice, e-way bill, or marketplace seller profile.
Validate typed or imported full GSTINs at entry
When a form or CSV submits fifteen characters, call validate mode and block save when valid is false, showing expected_check_character to help correct a single mistype.
Technical questions
How do I compute a GSTIN check character with this API?
POST with number set to exactly fourteen alphanumeric characters and mode compute (or omit mode). The response includes check_character and with_check (the full fifteen-character GSTIN).
How do I validate a full fifteen-character GSTIN?
POST with the fifteen-character string and mode validate. The response includes valid, check_character, expected_check_character, and payload (characters without the last check).