From the May 2025 return period, GSTR-1 Table 12 changed in ways that break the old habits. The table is now split into two separate tabs, one for B2B supplies and one for B2C. HSN codes can no longer be typed in by hand; you select each one from a dropdown. And the digit length depends on your turnover: if your aggregate annual turnover is up to Rs 5 crore you report 4-digit HSN codes, and if it is more than Rs 5 crore you report 6-digit codes. HSN reporting is mandatory for B2B lines and optional for B2C below the Rs 5 crore threshold. These changes are set out in the GSTN advisory on HSN reporting in Table 12 of GSTR-1/1A.
If you file for a B2B SME that sits below the e-invoice threshold, none of the usual shortcuts are available to you. The auto-population path only fills Table 12 for taxpayers who issue e-invoices, which by definition you do not. The "export the HSN summary in one click" feature in billing software only works if your sales already live inside that software as structured records. When your source data is a stack of loose PDF sales invoices in a dozen different layouts, you are the one who has to build the HSN data before any summary exists.
That is the gap this guide fills: preparing the GSTR-1 Table 12 HSN summary from sales invoices when you have no structured source to lean on. The method is four steps. Take the period's sales-invoice PDFs and pull each line's HSN, quantity, taxable value and tax into clean per-line rows. Pivot those rows in Excel into an HSN-wise roll-up. Then split the result into the B2B and B2C tabs. The sections that follow work through each step, but the shape is worth holding in mind from the start, because the hard part and the easy part are not where people expect.
The Extract-Then-Pivot Workflow at a Glance
The whole method runs in four steps, and it is worth seeing the full path before drilling into any single part.
First, gather the period's outward sales invoices as PDFs, however they arrive, whether exported from your billing tool, emailed by a colleague, or scanned from paper. Second, read each invoice line into one consistent table, capturing the HSN code, description, UQC, quantity, taxable value, rate and the CGST/SGST/IGST/cess split, with one row per line. Third, pivot that table into an HSN-wise roll-up. Fourth, separate the result into B2B and B2C. Run the same four steps every return period and you have a repeatable way to build the HSN summary manually for GSTR-1 without ever needing a structured ledger underneath it.
The reason to map it out first is that the difficulty is lopsided. The step that takes real work is the second one: reading consistent line data off many different invoice layouts, where the same fields hide in different places on every template. The roll-up itself is a single Excel pivot you run once the line data is clean. No tool aggregates your invoices into the HSN summary for you, and any workflow that implies it does is glossing over the part that actually consumes your time. Naming the division of labour honestly is the point, because it tells you where to spend effort and where not to.
It also helps to know where this particular workflow stops. This is the method for your own outward sales invoices. If your sales instead flow through marketplaces, the source documents are different and so is the approach; in that case you would build GSTR-1 from Amazon, Flipkart and Meesho marketplace reports using the MTR and TCS files those platforms generate, rather than your own tax invoices.
Mapping Invoice Line Items to the Table 12 Columns
Before you extract anything, fix the target column set in your mind, because every column in the HSN summary comes from a specific place on an invoice line. Table 12 needs the HSN code, a description of the goods or service, the UQC, the quantity, the taxable value, the rate of tax, and the tax amounts split into CGST, SGST, IGST and cess.
UQC is the unit quantity code, the standardised unit the portal recognises, entered as a fixed code such as NOS for numbers, KGS for kilograms, or MTR for metres. The portal will not accept a free-text unit, so this is the field most likely to trip you up. The quantity reported against an HSN is the total quantity for that HSN at a given rate across all the lines that share it, not a per-invoice figure.
Each column maps cleanly back to the invoice line once you know where to look:
- HSN and description come from the line's item description or its reference to your item master.
- UQC and quantity come from the line's unit of measure and the quantity sold.
- Taxable value is the line's pre-tax amount, the value the tax is calculated on.
- Rate is the GST rate applied to that line.
- CGST, SGST, IGST and cess come from the tax charged on the line, and which of these columns carry a value depends on the nature of the supply.
That last point is where the summary keeps two cases apart. An intra-state supply, where the place of supply is in your own state, carries CGST plus SGST. An inter-state supply carries IGST instead. The HSN summary keeps these as separate columns, so the determination you made when raising the invoice has to survive into the extracted data. Cess applies only to the specific goods that attract it, and stays zero otherwise.
Two practical snags recur here. The first is UQC normalisation: invoices print units as "pcs", "nos.", "units" or whatever the original template used, and each of those has to be mapped to the portal's UQC code before filing. The second is quantity aggregation: quantity must add up correctly per HSN and rate combination, so that ten lines of the same HSN at the same rate become one summed quantity rather than ten separate entries. Getting both right at the line level is far easier than fixing them after the roll-up.
If you are unsure what a compliant sales invoice should already carry, including the HSN or SAC against each line, the GST tax-invoice field requirements under Rule 46, including HSN/SAC set out the fields that ought to be present on the source document in the first place.
Extracting HSN and Tax Data from Varied Invoice Layouts
This is the step the rule-explainers skip, and it is where a return period's worth of work actually sits. The fields you need are the same on every invoice, but their position is not. One customer's template prints the HSN beside the description; another tucks it in a column header; a third abbreviates the rate and splits CGST and SGST into columns a fourth invoice merges. Multiply that across every layout your customers and your own billing have produced over a period, and transcribing line by line into a spreadsheet stops being feasible. The variation is the problem, not the volume.
What you are aiming for is a single table where every invoice line has become one row, carrying HSN, description, UQC, quantity, taxable value, rate, CGST, SGST, IGST and cess. Crucially, each row should trace back to its source invoice and page, so that when a number looks wrong you can find the original in seconds rather than hunting through a folder. That traceability is what turns a pile of PDFs into auditable working papers.
The source files themselves are rarely tidy. You will have native PDFs from accounting software, scanned copies of invoices that came in on paper, the occasional phone photo, and single PDF files that concatenate dozens of invoices into one document. All of them have to resolve into the same row structure for the pivot to work. And because the HSN summary depends on what was sold on each line, this has to be line-item extraction, one row per line, not invoice-level extraction that collapses an invoice to a single total. A summary built from invoice totals cannot be split by HSN at all.
This reading-across-layouts problem is exactly what a tool like Invoice Data Extraction is built for. You upload the period's sales invoices, including native and scanned PDFs, images, and multi-invoice files, in batches up to 6,000 documents or single PDFs up to 5,000 pages. Then you describe what you want in a plain prompt, for example to extract HSN line data from sales-invoice PDFs into Excel with one row per line and a column each for HSN, UQC, quantity, taxable value, rate and the tax split. What comes back is a structured Excel file of per-line rows, with every row carrying a reference to its source file and page so you can verify against the original. To be clear about the boundary: this produces the clean line-level data; it does not roll the lines up per HSN for you. That aggregation is the Excel pivot in the next step, and it stays your step. The same approach works on the inbound side too, where you would extract Indian purchase invoices to a GST-ready Excel register for your input-side records.
Pivoting the Line Rows into the HSN-Wise Summary
With a clean line-level table in hand, the roll-up is a single Excel pivot. Drop HSN into the pivot rows, and add rate alongside it, because one HSN can appear at more than one tax rate and Table 12 treats each HSN-and-rate combination as its own line. Set quantity, taxable value, CGST, SGST, IGST and cess as summed values. Carry UQC and description through as row attributes so they travel with each HSN rather than being lost in the aggregation. That is the entire operation; there is no second pass, and it is your step to run on the extracted rows rather than anything the extraction does for you.
One thing that makes the pivot painless is having the numeric columns arrive as real numbers rather than text. When taxable value, quantity and the tax amounts are native Excel number types, the pivot sums them immediately, with no cleanup pass to strip stray characters or convert text-that-looks-like-a-number into something Excel will add. If your extracted file already types those columns correctly, you go straight from table to summary.
The pivot output is the HSN summary itself: one line per HSN-and-rate combination, with the summed quantity, taxable value and tax against each. That is the data you then enter against the dropdown HSN selections in Table 12. When you export the HSN-wise sales data to Excel for GSTR-1, arrange the columns in the order the portal or the offline Returns tool expects, so that what you have prepared maps directly onto where each value has to go rather than forcing you to reorder at the point of filing.
Splitting B2B and B2C and Reconciling the Totals
Since the May 2025 change, the GSTR-1 Table 12 B2B vs B2C HSN split is no longer a sorting step you do at the end; the two now live on separate tabs. The cleanest way to handle it is to tag each invoice as B2B or B2C at the extraction stage, so the two streams are separable from the start instead of being untangled after the pivot. The signal is straightforward: an invoice raised to a registered recipient carrying a GSTIN is B2B, and everything else is B2C. Capture that flag as a column when you extract, and you can split the summary by filtering on it rather than re-reading invoices. Remember that HSN is mandatory on the B2B tab and optional for B2C below the Rs 5 crore threshold, so the B2B side is where accuracy matters most.
The reason line-level extraction matters shows up clearly with mixed invoices. A single sales invoice often carries several lines under different HSN codes and different tax rates, a fabricated assembly billed alongside the raw material it used, say, each at its own rate. There is no meaningful per-invoice HSN total for such a document; the only correct unit is the line. Extracting at line level and pivoting on HSN-and-rate is precisely what handles this, distributing each line to the right HSN bucket regardless of how many rates shared the invoice.
Before you file, run one reconciliation check. The sum of taxable value across your whole HSN summary should equal the total outward taxable value you are reporting for the period. If the two do not tie, something has gone wrong upstream: a line was missed in extraction, an HSN was miscoded, or an invoice was counted twice. This single tie-out catches most of the errors that would otherwise surface as a portal validation failure or a notice later. Pair it with a quick pass over UQC normalisation and per-HSN quantity totals, the two fields most prone to silent mistakes, and the summary is ready.
This workflow covers the outward-supply side of your GST filing. The inbound side has its own document trail; if you import goods, you would separately extract import Bills of Entry to claim import-IGST ITC, which feeds your input tax credit rather than Table 12.
Extract invoice data to Excel with natural language prompts
Upload your invoices, describe what you need in plain language, and download clean, structured spreadsheets. No templates, no complex configuration.
Related Articles
Explore adjacent guides and reference articles on this topic.
Amazon, Flipkart & Meesho Invoices to GSTR-1
Build a GSTR-1-ready Excel workflow for Amazon MTR, Flipkart Sales Reports, Meesho TCS reports, and marketplace tax invoice PDFs.
Extract Apparel Wholesale Invoices to Excel in India
Convert Indian apparel wholesale GST invoices into Excel without losing size-wise quantities, HSN, rates, tax splits, and GSTR-1-ready line items.
Extract Indian Bill of Entry to Excel for ITC & Landed Cost
Convert Indian Bills of Entry from PDF to Excel — extract BCD, SWS, IGST, CTH and port code to build your import-IGST ITC register and landed-cost sheet.