Reading the GST portal's JSON files in Excel
Where GSTR-1, 2A and 2B JSON files come from, what their short field codes mean, how the Summary totals are counted and how to match GSTR-2B against your books.
Last reviewed · 1,693 words
In short
- Check which return a file is before you read its GSTIN column. In GSTR-1 it is your customer; in GSTR-2A and GSTR-2B it is your supplier.
- Choose the portal's .zip as it is, and choose every part of a split return together, so all the rows land in one workbook.
- Take invoice values from the Summary, not from a column sum. An invoice with several items repeats its value on every item row.
- Do not add the Summary rows together. Credit notes are not subtracted, and the HSN sheets repeat the invoice sheets.
- To match GSTR-2B with your purchase register, key both on supplier GSTIN plus invoice number and total the tax per key with SUMIFS.
- Turn the DD-MM-YYYY date text into Excel dates before sorting by date.
You have a GSTR-1, GSTR-2A or GSTR-2B file from the GST portal and need it in Excel, to check what was reported or to match suppliers' invoices against your books. The JSON is written in short codes such as ctin and txval. Here is how each file is organised and how to read the sheets.
Getting the files from the portal
| File | Where it comes from | What you get |
|---|---|---|
| GSTR-1 for upload | Returns Offline Tool | A .json of at most 5 MB; larger returns are split into several files |
| GSTR-1 from the portal | Prepare offline, Download, Generate JSON file to download | A .zip, about 20 minutes to generate |
| GSTR-2A | GSTR-2A tile, Download, Generate JSON file to download | A .zip, up to 20 minutes |
| GSTR-2B | Returns Dashboard, GSTR-2B tile, Download | A JSON file |
GSTR-2B is generated on the 14th day of the month after the tax period, or after the quarter for quarterly filers, so a monthly filer's August 2026 statement is generated on 14 September 2026.
Choose the portal's .zip as it is; the converter opens it and reads the JSON inside. GSTN does not publish the layout inside its GSTR-1 and GSTR-2A zips, so the converter goes by the names in GSTN's API documents and keeps anything else under its own field names.
One key, two meanings
In GSTR-1, ctin is the GSTIN or UIN of the recipient, your customer. In GSTR-2A and GSTR-2B it is your supplier's GSTIN. A GSTIN column means nothing until you know which return it came from, so the sheets say "Recipient GSTIN/UIN" or "Supplier GSTIN", never plain GSTIN.
The converter tells the returns apart by their keys: docdata and rtnprd mean GSTR-2B, cdn and cfs3b mean GSTR-2A, and sections only a supplier files, such as b2cs and hsn, mean GSTR-1. A file of nothing but B2B invoices could be GSTR-1 or GSTR-2A; it is read as GSTR-1 with a note, and the Return type menu changes that.
How a GSTR-1 file is organised
At the top sit gstin (the supplier filing), fp (the period as MMYYYY, so 082026 is August 2026) and gt (gross turnover in the preceding financial year), then one key per section. Invoices nest four levels deep: b2b holds a group per recipient ctin, each group an inv list, each invoice an itms list, each item an itm_det of amounts.
| Code | Meaning |
|---|---|
inum | Invoice number, up to 16 characters |
idt | Invoice date, DD-MM-YYYY |
val | Invoice value |
pos | Place of supply, a two-digit State code |
rchrg | Reverse charge, Y or N |
rt, txval | Rate (%) and taxable value |
iamt, camt, samt, csamt | IGST, CGST, SGST, cess |
Other sections differ. b2cl holds inter-State invoices to unregistered buyers above ₹1,00,000 from the August 2024 period (₹2,50,000 before). b2cs is flat summary rows with no items. Notes sit in cdnr and cdnur, advances in at and txpd, and each of these invoice, note and advance sections has an amendment twin ending in "a", such as b2ba.
GSTN's v5.0 schema reshapes at, txpd and doc_issue. We found no GSTN statement on which layout the offline tool now writes, so the converter reads both.
What changes in GSTR-2A and GSTR-2B
GSTR-2A keeps GSTR-1's invoice layout and field names, seen from the buyer's side. Each supplier group carries cfs and cfs3b (whether GSTR-1/5 and GSTR-3B were filed) and a filing date and period written 11-Sep-26 and Aug-26.
GSTR-2B renames most things:
| Meaning | GSTR-1 and GSTR-2A | GSTR-2B |
|---|---|---|
| Invoice date | idt | dt |
| Reverse charge | rchrg | rev |
| Invoice type | inv_typ | typ |
| Tax amounts | iamt, camt, samt, csamt | igst, cgst, sgst, cess |
| Note number | nt_num | ntnum |
| Items | itms, each with itm_det | items, flat |
A GSTR-2B file arrives as {chksum, data: {...}}, or with an extra status_cd layer from the API; both are unwrapped. Inside, gstin is you, the receiver, and docdata holds the sections. GSTN's release note of 24 October 2024 added invoice-level tax totals and docRejdata, the documents rejected in IMS, which get "Rejected" sheets. Older files may carry tax only inside items, and GSTN's own documents conflict on items: the v4.5 schema allows them, its attribute sheet and sample show only invoice totals.
Codes the sheets keep as codes
The Summary's legend explains the codes found in your file.
| Field | Code | Meaning |
|---|---|---|
| Invoice type | R, DE, SEWP, SEWOP | Regular B2B; deemed exports; SEZ exports with and without payment |
| Invoice type | CBW | Sources conflict: Custom Bonded Warehouse (GSTR-1 attribute sheet) or intra-State supplies attracting IGST (GSTR-2B acronyms, portal's GSTR-1 guide) |
| Note type | C, D, R | Credit note, debit note, refund voucher |
| Export type | WPAY, WOPAY | With or without payment of GST |
| ITC available (2B) | Y, N, T | Yes; no; temporarily available |
| Reason (2B) | P | Place of supply and supplier's State the same, recipient's State different |
| Reason (2B) | C | Return filed after the annual cut-off |
No legend is given where GSTN is unclear: GSTR-2B invoice types (SEZNAO in its schema, SEZ(Not for AO) in its sample), imsStatus, and nil-rated supply types such as INTRB2B.
What each sheet holds
After the Summary comes one sheet per section in GSTN's order. On invoice and note sheets each row is one item, with its GSTIN, document number, date and value repeated beside it, so rows sort and filter on their own.
Headings are in words, per return and section, such as "Note value" on note sheets. Place of supply 27 becomes 27-Maharashtra. Amounts are numbers shown as #,##0.00; GSTINs, invoice numbers, dates and codes stay text.
Sections GSTN never describes field by field, such as GSTR-2B's itcsumm, keep the file's own names, as any JSON does in the JSON to Excel Converter.
Reading the Summary totals
Each section gets a Summary row, counted two ways: Value = sum of val, once per document, but Taxable value = sum of txval over every item row.
The sample GSTR-1's B2B sheet has 3 invoices on 4 rows. Its value is 29,500 + 22,560 + 18,585.60 = 70,645.60. Summing the Invoice value column instead gives 93,205.60, because the two-item invoice's 22,560 counts twice.
| Summary row | Documents | Rows | Value | Taxable value | IGST | CGST | SGST |
|---|---|---|---|---|---|---|---|
| B2B | 3 | 4 | 70,645.60 | 60,750.50 | 7,060.00 | 1,417.55 | 1,417.55 |
| HSN B2B | 2 | 60,750.50 | 7,060.00 | 1,417.55 | 1,417.55 |
Credit notes get their own row and are never subtracted, and the HSN B2B row repeats the B2B row, so the rows are not meant to be added together. A tax head missing from an item counts as 0, since GSTN's schema requires only rt and txval. In a GSTR-1 upload file, a record flagged D asks the portal to delete that invoice, so it is listed but not counted.
To spot a keying slip, test rows against IGST + CGST + SGST ≈ taxable value × rate ÷ 100, times 0.65 on differential-rate rows, cess apart. For SAMPLE/003, 15,750.50 × 18 ÷ 100 = 2,835.09 against 1,417.55 + 1,417.55 = 2,835.10: a paisa of rounding.
The HSN summary on two sheets
Table 12 of GSTR-1, the HSN summary, is now split into B2B and B2C tabs, which arrive as hsn_b2b and hsn_b2c and become the HSN B2B and HSN B2C sheets. Older files keep one list under hsn.data, which becomes one HSN sheet.
GSTN's release note of 23 January 2025 said the split starts from the February 2025 return period; its portal advisory dated 1 May 2025 says May 2025, the later statement. The converter goes by the file's shape, not its period. The same advisory adds portal checks of Table 12's values against the other tables, in warning mode at first.
For periods after March 2021, hsn_sc (the 2 to 8 digit code), uqc and rt together identify a row. GSTN's attribute sheet lists rates only up to 28%, though a 40% rate took effect on 22 September 2025; the converter checks rates against no list.
Matching GSTR-2B with your purchase register
Put your purchase register beside the GSTR-2B workbook. In both, build a key such as =TRIM(A2)&"|"&UPPER(TRIM(E2)), where A holds the GSTIN and E the invoice number. A GSTR-2B invoice with items spans several rows, so total per key with tax per invoice = SUMIFS(tax column, key column, key), then difference = tax in books − tax in GSTR-2B.
With the sample GSTR-2B and a made-up register:
| Supplier | Invoice | Tax in books | Tax in GSTR-2B | Difference |
|---|---|---|---|---|
| Sample Supplier One | S1/2026/101 | 9,000 IGST | 9,000 IGST | 0 |
| Sample Supplier One | S1/2026/102 | 1,800 IGST | 1,800 IGST | 0 |
| Sample Supplier Two | ST-55 | 2,040 CGST + SGST | 2,040 (two item rows) | 0 |
| Supplier Three | MX/88 | 2,700 IGST | Not in GSTR-2B | 2,700 |
| Total | 15,540 | 12,840 | 2,700 |
The whole gap is one invoice to raise with its supplier. The file's CDNR sheet also holds credit note CN-7, IGST 900, which this register lacks. Filter "ITC available" for N or T and read the Reason column. The sheets show what the file says; the matching, and any decision about credit, stays with you.
What this tool assumes
- It reads .json and .zip files, and a zip inside a zip one level down. Encrypted, ZIP64 and damaged zips are refused.
- Up to 20 MB of JSON converts at a time. In our test in Chrome, 40,000 invoices were ready in about a second and the 19.8 MB .xlsx took about 5.4 seconds; slower devices take longer.
- Several files of one return merge, with a File column and a note if GSTINs or periods differ; different returns are refused unless you choose a type.
- Totals are the file's amounts as written, checked against neither the portal nor your register, and GSTIN check digits are not validated.
- Dates stay DD-MM-YYYY text. To sort, convert a date in G2 with
=DATE(RIGHT(G2,4), MID(G2,4,2), LEFT(G2,2)). - It was tested on GSTN's documented samples and made-up files, never a real portal download.
- Files are read in your browser. The spreadsheet library loads from calci.in on your first Excel download, and nothing with your data is sent.
Sources
- GSTN developer portal — GSTR-1 Save GSTR1 data v5.0, attribute sheet
- GSTN developer portal — GSTR-2A Get B2B Invoices v2.2, attribute sheet
- GSTN developer portal — GSTR-2B Get All Details v4.5, attribute sheet
- GST portal — Returns Offline Tool user manual
- GST portal — FAQs on Form GSTR-2B
- GST portal — advisory on reporting HSN codes in Table 12 of GSTR-1/1A