Your data stays on your device. Nothing is uploaded to any server.

GSTR-1 JSON Format

The GSTN portal accepts GSTR-1 data as a JSON file upload. Understanding the JSON structure helps you prepare data offline, validate it before upload, and troubleshoot upload errors. This page documents each section of the GSTR-1 JSON format.

Top-Level Structure

The GSTR-1 JSON file is a single object with section keys as properties. The top-level structure carries the GSTN upload header (`gstin`, `fp`, `version`, `hash`) followed by the return tables. GSTSelf emits only the sections that have data — empty tables are dropped, exactly like the file the official offline tool and the portal produce:

{
  "gstin": "27AAPFU0939F1ZV",
  "fp": "042024",
  "version": "GST3.2.4",
  "hash": "hash",
  "b2b": [...],
  "nil": { "inv": [...] },
  "b2cs": [...],
  "doc_issue": { "doc_det": [...] }
}
Important: The only file the portal accepts is the GSTR1_<gstin>_<fp>.json file that GSTSelf downloads from "Download GSTR-1 JSON". This file uses version: "GST3.2.4" with only the sections that have data — it does not include gt, cur_gt, orfiling_typ (those belong to the portal's own round-trip wrapper, not the invoice-bulk upload format). Your workspace backup (GSTSelf_Working_*.json, schemaVersion: "gstself-working-json-v1") is an internal records backup and will be rejected by the portal — never upload it as GSTR-1. GSTR-1 generation is blocked until the portal validation checks pass.

The GSTR-1 JSON file is a single object with section keys as properties. Not all sections are required — only include sections that your outward supplies fall into. The top-level structure also includes metadata:

FieldDescriptionExample
gstinYour 15-digit GSTIN27AAPFU0939F1ZV
fpFinancial period (MMYYYY)042024
versionGSTR-1 JSON schema version used by the offline tool uploadGST3.2.4
hashSHA-2 digest of the file contents used by the portalhash

gt and cur_gt are only present when the official offline tool is given a gross-turnover figure; GSTSelf files leave them out for monthly filings. Date formats in the JSON use DD-MM-YYYY (e.g., "15-04-2024"), not ISO format.

Tax Amount Fields

Each line item in the JSON uses these tax fields:

FieldDescriptionIntra-StateInter-State
rtGST rate (%)1818
txvalTaxable value100000100000
camtCGST amount90000
samtSGST amount90000
iamtIGST amount018000
csamtCess amount00

For intra-state: camt + samt = total tax. For inter-state: iamt = total tax. All other tax fields should be 0.

Section Details

b2b

B2B — Invoices to Registered Persons

An array of entries grouped by the recipient GSTIN. Each GSTIN entry carries an array of invoices, each with an invoice number, date, total value, place of supply, reverse charge flag, and an array of line items with rate, taxable value, and tax amounts (CGST, SGST, IGST).

Required fields:

ctininumidtvalposrchrgsply_tyitms
Show example JSON
{
  "ctin": "29AABCT1332L1ZV",
  "inv": [{
    "inum": "INV-2024-001",
    "idt": "15-04-2024",
    "val": 118000,
    "pos": "27",
    "rchrg": "N",
    "sply_ty": "R",
    "itms": [{
      "num": 1,
      "itm_det": {
        "rt": 18,
        "txval": 100000,
        "iamt": 0,
        "camt": 9000,
        "samt": 9000,
        "csamt": 0
      }
    }]
  }]
}
b2cl

B2CL — B2C Large (Unregistered, > ₹1,00,000)

Inter-state invoices to unregistered persons above ₹1,00,000. Grouped by place of supply, each entry listing the individual invoices.

Required fields:

posinumidtvalitms
Show example JSON
{
  "pos": "27",
  "inv": [{
    "inum": "INV-005",
    "idt": "18-04-2024",
    "val": 300000,
    "itms": [{
      "num": 1,
      "itm_det": {
        "rt": 18,
        "txval": 254237,
        "iamt": 45763,
        "camt": 0,
        "samt": 0,
        "csamt": 0
      }
    }]
  }]
}
b2cs

B2CS — B2C Small (Unregistered, ≤ ₹1,00,000)

All other B2C supplies — aggregated by place of supply and GST rate. Includes intra-state supplies and inter-state supplies up to ₹1,00,000.

Required fields:

typposrttxvaliamtcamtsamt
Show example JSON
{
  "typ": "OE",
  "pos": "27",
  "rt": 18,
  "txval": 50000,
  "iamt": 0,
  "camt": 4500,
  "samt": 4500,
  "csamt": 0
}
exp

EXP — Exports and SEZ Supplies

Export invoices (with or without LUT/Bond) and supplies to SEZ units. exptyp is WPAY (with IGST payment) or WOPAY (without payment, under LUT/Bond). Shipping bill details are captured separately.

Required fields:

exptypinumidtvalitms
Show example JSON
{
  "exptyp": "WOPAY",
  "inum": "EXP-2024-001",
  "idt": "15-04-2024",
  "val": 500000,
  "itms": [{
    "num": 1,
    "itm_det": {
      "rt": 18,
      "txval": 500000,
      "iamt": 90000,
      "camt": 0,
      "samt": 0,
      "csamt": 0
    }
  }]
}
cdnr

CDNR — Credit and Debit Notes (Registered)

Credit notes (ntty C) and debit notes (ntty D) issued to registered recipients. Each must reference the original invoice (inum/idt). sply_ty is R (regular B2B).

Required fields:

ctinnttyntnumntdtinumidtvalposrchrgitms
Show example JSON
{
  "ctin": "29AABCT1332L1ZV",
  "ntty": "C",
  "sply_ty": "R",
  "ntnum": "CN-2024-001",
  "ntdt": "20-04-2024",
  "inum": "INV-2024-001",
  "idt": "15-04-2024",
  "val": 11800,
  "pos": "27",
  "rchrg": "N",
  "itms": [{
    "num": 1,
    "itm_det": {
      "rt": 18,
      "txval": 10000,
      "iamt": 0,
      "camt": 900,
      "samt": 900,
      "csamt": 0
    }
  }]
}
cdnur

CDNUR — Credit and Debit Notes (Unregistered)

Credit and debit notes issued to unregistered persons. typ is the UR type code (B2CL, B2CS, EXPWP, EXPWOP, SEZWP, SEZWOP) mirroring the original supply classification.

Required fields:

typnttyntnumntdtvalpositms
Show example JSON
{
  "typ": "B2CL",
  "ntty": "C",
  "ntnum": "CN-2024-002",
  "ntdt": "20-04-2024",
  "val": 5900,
  "pos": "27",
  "itms": [{
    "num": 1,
    "itm_det": {
      "rt": 18,
      "txval": 5000,
      "iamt": 0,
      "camt": 450,
      "samt": 450,
      "csamt": 0
    }
  }]
}
at

AT — Advances Received (Table 11A)

Tax liability on advances received for future supplies, reported gross (tax-inclusive) and rate-wise. Adjusted against invoices issued in a later period.

Required fields:

posrtadvcamtsamtiamtcsamt
Show example JSON
{
  "pos": "27",
  "rt": 18,
  "adv": 50000,
  "camt": 4500,
  "samt": 4500,
  "iamt": 0,
  "csamt": 0
}
atadj

ATADJ — Advance Adjustments (Table 11B)

Adjustment of tax paid on advances against invoices actually issued in the period. adnamt is the gross advance adjusted.

Required fields:

posrtadnamtcamtsamtiamtcsamt
Show example JSON
{
  "pos": "27",
  "rt": 18,
  "adnamt": 50000,
  "camt": 4500,
  "samt": 4500,
  "iamt": 0,
  "csamt": 0
}
nil

NIL — Nil Rated, Exempted and Non-GST Supplies (Table 8)

Summary of nil-rated, exempted, and non-GST outward supplies, split by supply type (sply_ty). Even if all supplies are exempt, this section must be filed. GSTSelf emits one entry per sply_ty with the exempt (expt_amt), nil-rated (nil_amt) and non-GST (ngsup_amt) totals.

Required fields:

invsply_tyexpt_amtnil_amtngsup_amt
Show example JSON
{
  "inv": [{
    "sply_ty": "INTRAB2C",
    "expt_amt": 50000,
    "nil_amt": 100000,
    "ngsup_amt": 0
  }]
}
hsn

HSN — HSN-wise Summary

HSN-wise summary of outward supplies inside an object carrying the rows in the data array. HSN digits depend on turnover: 6 digits above ₹5 crore, 4 digits between ₹1.5–5 crore.

Required fields:

hsncddescuqcqtytxvaliamtcamtsamt
Show example JSON
{
  "data": [{
    "hsncd": "6109",
    "desc": "T-shirts, knitted",
    "uqc": "NOS",
    "qty": 500,
    "val": 118000,
    "txval": 100000,
    "iamt": 0,
    "camt": 9000,
    "samt": 9000,
    "csamt": 0,
    "rt": 18
  }]
}
doc_issue

DOC_ISSUE — Documents Issued (Table 13)

Serial-number ranges of documents issued during the period, by document nature. from/to bound the range, totnum is the total issued, canc the count cancelled, net_issue the figure reported (totnum − canc).

Required fields:

doc_numdocsfromtototnumcancelnet_issue
Show example JSON
{
  "doc_det": [{
    "doc_num": 1,
    "docs": [{
      "num": 1,
      "from": "1",
      "to": "135",
      "totnum": 135,
      "cancel": 0,
      "net_issue": 135
    }]
  }]
}

Common Upload Errors

Duplicate invoice number

Invoice numbers must be unique within a financial year. The portal rejects JSON files with duplicate invoice numbers.

Invalid GSTIN format

GSTINs must be exactly 15 characters with a valid check digit. The portal validates the check digit algorithmically.

Tax amount mismatch

The portal validates that camt + samt = total tax for intra-state, and iamt = total tax for inter-state. Rounding differences of ₹1 are usually accepted.

Invalid place of supply code

POS must be a valid 2-digit state code (01-37 for states, 97 for centre/foreign). Verify the state code matches the recipient's state.

Generate GSTR-1 JSON with GSTSelf

GSTSelf can prepare your GSTR-1 data from your invoice records and generate a JSON file ready for upload to the GSTN portal. All processing happens in your browser.