Troubleshooting

GST JSON Validation Error Fix - Common Errors & Solutions 2026

Troubleshoot and fix GST JSON validation errors including syntax errors, missing fields, invalid format issues with step-by-step solutions.

GST Converter Team
#JSON #Validation #Errors #Fix #GSTR

Common GST JSON Validation Errors

When downloading JSON files from GST portal or uploading them to conversion tools, you may encounter validation errors. This guide covers all common errors and their fixes.

Error 1: “Invalid JSON Format”

Symptoms

  • Converter shows “Invalid JSON” message
  • File won’t open in JSON viewers
  • Error when uploading to GST portal

Common Causes

1. Incomplete Download

{
  "gstin": "29AABCT1332L000",
  "fp": "032024",
  "b2b": [
    {
      "ctin": "29AABCU1332

File ends abruptly without closing braces.

2. Manual Editing Errors Added comma at wrong place or deleted crucial characters.

3. File Corruption Damaged during transfer or storage.

How to Fix

Solution 1: Re-download from GST Portal

  1. Login to GST Portal
  2. Navigate to ReturnsGSTR-1 or GSTR-2B
  3. Select correct tax period
  4. Click Download JSON again
  5. Wait for complete download (don’t interrupt)
  6. Verify file size (should be larger than 1 KB)

Solution 2: Validate JSON Syntax

Use online JSON validator:

  1. Open file in text editor (Notepad++, VS Code)
  2. Copy entire content
  3. Paste in JSONLint.com or similar validator
  4. Check error messages pointing to exact line

Solution 3: Check File Extension

Ensure file ends with .json:

  • gstr1.txt
  • gstr1.json.txt
  • gstr1.json

Windows: Enable “File name extensions” in View menu to see real extension.

Error 2: “Missing Required Fields”

Symptoms

  • “GSTIN not found” error
  • “Filing period missing” error
  • Validation fails on upload

Required Fields by Return Type

GSTR-1 JSON Must Have:

{
  "gstin": "Required - 15 digit GSTIN",
  "fp": "Required - MMYYYY format",
  "b2b": [...],   // Optional but common
  "b2cl": [...],  // Optional
  "b2cs": [...]   // Optional
}

GSTR-2B JSON Must Have:

{
  "data": {
    "docdata": {
      "b2b": [...],  // At least one section needed
      "cdn": [...],
      "isd": [...]
    }
  }
}

How to Fix

Check GSTIN Field

Valid GSTIN format: 29AABCT1332L000 (15 characters)

"gstin": "29AABCT1332L000"  ✅ Correct
"gstin": "29AABCT1332L"      ❌ Only 14 digits
"gstin": ""                  ❌ Empty

Check Filing Period (fp)

Valid format: MMYYYY

"fp": "032024"     ✅ Correct (March 2024)
"fp": "3-2024"     ❌ Wrong separator
"fp": "03/2024"    ❌ Wrong separator
"fp": "2024-03"    ❌ Wrong order

Fix Missing Root Fields

If GSTIN or fp missing, the JSON is likely corrupted. Re-download from portal.

Error 3: “Unexpected Token” or “Syntax Error”

Common Syntax Mistakes

Missing Comma

{
  "gstin": "29AABCT1332L000"
  "fp": "032024" Missing comma after gstin
}

Fix:

{
  "gstin": "29AABCT1332L000",   Add comma
  "fp": "032024"
}

Extra Comma (Trailing Comma)

{
  "gstin": "29AABCT1332L000",
  "fp": "032024",   Trailing comma before }
}

Fix:

{
  "gstin": "29AABCT1332L000",
  "fp": "032024" Remove last comma
}

Unmatched Brackets

{
  "b2b": [
    {"ctin": "29AABCU1332L000"}
    ]   Missing comma or extra bracket
}

Fix: Use JSON formatter to identify bracket mismatches.

Quote Issues

{
  "gstin": '29AABCT1332L000' Single quotes not allowed
}

Fix:

{
  "gstin": "29AABCT1332L000" Use double quotes
}

How to Fix Syntax Errors

  1. Use JSON Validator

    • Copy JSON content
    • Paste in JSONLint.com
    • It will highlight exact error line
  2. Use Text Editor with JSON Support

    • Visual Studio Code
    • Notepad++ with JSON plugin
    • Sublime Text

    These editors show syntax highlighting and bracket matching.

  3. Auto-Format JSON Most editors can auto-format:

    • VS Code: Right-click → Format Document
    • Online: Use JSONLint → Format/Beautify

Error 4: “File Size Too Large”

Symptoms

  • Upload fails with “File too large” message
  • Browser crashes when opening file
  • Converter timeouts

Typical File Sizes

  • Small business: 100 KB - 2 MB
  • Medium business: 2 MB - 10 MB
  • Large business: 10 MB - 50 MB

How to Fix

Solution 1: Use Our Converter

Our GST JSON to Excel tool handles files up to 50 MB.

Solution 2: Split Data by Period

If you’re processing multiple months:

  1. Download JSON for each month separately
  2. Convert individually
  3. Merge Excel files later

Solution 3: Check If File Is Corrupted

If file is unexpectedly huge (100+ MB):

  • Likely corrupted or contains duplicate data
  • Re-download from portal
  • Contact GST helpdesk if issue persists

Error 5: “Encoding/Character Set Error”

Symptoms

  • Special characters show as or gibberish
  • Indian rupee symbol (₹) shows incorrectly
  • Non-English characters corrupted

How to Fix

Ensure UTF-8 Encoding

In Notepad++:

  1. Open JSON file
  2. Encoding → Convert to UTF-8
  3. Save file

In VS Code:

  1. Open file
  2. Bottom right corner shows encoding
  3. Click encoding → Reopen with Encoding → UTF-8

When Downloading: Ensure browser doesn’t modify encoding. Chrome and Firefox handle this correctly.

Error 6: “Empty File” or “No Data Found”

Symptoms

  • File size is very small (< 1 KB)
  • JSON contains only {} or {"data": {}}
  • No invoices extracted

Possible Reasons

  1. No transactions in that period

    • Genuinely no sales/purchases
    • Normal for new businesses or inactive periods
  2. Wrong return type selected

    • Downloaded GSTR-3B instead of GSTR-1
    • Downloaded GSTR-1 instead of GSTR-2B
  3. Download before filing

    • Trying to download before filing return
    • For GSTR-2B: Download after 12th of next month

How to Fix

  1. Verify tax period: Check if you selected correct month/quarter

  2. Check return status: Ensure return is filed (for GSTR-1) or generated (for GSTR-2B)

  3. Try different period: Download JSON for a period you know has transactions

Error 7: “Version Mismatch” or “Unsupported Format”

Symptoms

  • “JSON version not supported” error
  • Old conversion tools fail
  • Format doesn’t match expected structure

GST JSON Format Versions

GST portal has updated JSON structure multiple times:

  • Pre-2020: Different structure
  • 2020-2021: Introduction of GSTR-2B
  • 2022+: Minor field additions

How to Fix

Use Updated Tools

Our converter tool is always updated to handle latest format changes.

Check JSON Structure

GSTR-2B introduced in Aug 2020 has different structure than older GSTR-2A JSON.

Modern GSTR-2B:

{
  "data": {
    "docdata": {...}
  }
}

If your tool expects old format, it will fail. Solution: Use our converter.

Error 8: “Duplicate Invoice Numbers”

Symptoms

  • Validation warning about duplicate invoices
  • Same invoice appears multiple times
  • Upload to portal rejected

Causes

  1. Legitimate duplicates:

    • Invoice amended (both original and amended appear)
    • Invoice in multiple sections (B2B and export)
  2. Data entry error:

    • Same invoice uploaded twice
    • Copy-paste mistake in billing software

How to Fix

Identify Duplicates in Excel

After converting to Excel:

  1. Select Invoice Number column
  2. Home → Conditional Formatting → Highlight Duplicates
  3. Review highlighted cells

For Genuine Amendments

Keep both entries. GSTR-1 allows amendments showing original + corrected.

For Errors

  1. Return to billing software
  2. Delete duplicate entry
  3. Re-export and upload to portal

Error 9: “Invalid GSTIN Format”

Symptoms

  • “GSTIN invalid” error
  • Validation fails for customer/supplier GSTIN

Valid GSTIN Format

Structure: 22AAAAA0000A1Z5

  • Position 1-2: State code (01 to 37)
  • Position 3-12: PAN number
  • Position 13: Entity number (1-9, A-Z)
  • Position 14: Z (default)
  • Position 15: Check digit

Common GSTIN Errors

"ctin": "9AABCT1332L000"    ❌ Only 14 characters
"ctin": "29AABCT1332L000Z"16 characters
"ctin": "29-AABCT-1332L000" ❌ Hyphens not allowed
"ctin": ""                  ❌ Empty
"ctin": "00AABCT1332L1Z5"   ❌ State code 00 invalid

How to Fix

  1. Verify on GST Portal: Search for GSTIN on gst.gov.in → Search Taxpayer

  2. Check State Code: Ensure first 2 digits match state:

    • 29 = Karnataka
    • 27 = Maharashtra
    • 07 = Delhi
    • etc.
  3. Validate Checksum: 15th digit is calculated based on first 14. Use GSTIN validator tools.

Error 10: “Date Format Error”

Symptoms

  • Dates not recognized
  • “Invalid date” validation error
  • Dates show as text in Excel

Valid Date Format in GST JSON

Required format: DD-MM-YYYY

"idt": "15-03-2024"     ✅ Correct
"idt": "15/03/2024"     ❌ Wrong separator
"idt": "2024-03-15"     ❌ Wrong order (ISO format)
"idt": "Mar 15, 2024"   ❌ Text format

How to Fix

If dates are wrong in JSON, the source (billing software) is exporting incorrectly.

Fix at source:

  1. Check billing software date format settings
  2. Set to DD-MM-YYYY
  3. Re-export JSON
  4. Upload to portal

Preventing JSON Validation Errors

Best Practices

  1. Download directly from portal - Don’t use third-party downloads
  2. Don’t edit JSON manually - High risk of breaking syntax
  3. Use reliable billing software - Ensure GST-compliant exports
  4. Verify before filing - Convert to Excel and review data
  5. Keep backups - Save original JSON files
  6. Use updated tools - Our converter handles all formats
  7. Check file integrity - Compare file size with expected
  8. Avoid special characters - In invoice descriptions, stick to alphanumeric

Testing JSON Validity

Method 1: Online Validators

JSONLint: https://jsonlint.com

  • Paste JSON content
  • Click “Validate JSON”
  • Shows exact error line and description

Method 2: Text Editors

Visual Studio Code:

  • Open JSON file
  • Bottom left shows ”✓” if valid
  • Shows ”✗” with error count if invalid
  • Hover over errors to see details

Method 3: Our Converter

Upload to our converter:

  • Automatic validation
  • Clear error messages
  • Suggestions for fixes

When to Contact GST Helpdesk

Contact GST support if:

  1. ❌ Downloaded JSON is consistently corrupted
  2. ❌ Portal shows error on valid JSON file
  3. ❌ File structure doesn’t match any known format
  4. ❌ GSTIN validation fails despite being correct
  5. ❌ Technical errors on portal during download

GST Helpdesk: 1800-103-4786 or support@gst.gov.in

Frequently Asked Questions

Can I fix JSON errors manually?

Only if you understand JSON syntax. Better to re-download from portal or use automated tools.

Why does my JSON work in one tool but not another?

Different tools may support different JSON versions. Use updated tools like our converter.

Is there a tool to auto-fix JSON errors?

JSONLint can format but won’t fix logical errors (wrong GSTIN, missing data). For such issues, fix at source (billing software).

What if I deleted a crucial character?

Re-download the file. Manual repairs are risky and time-consuming.

Can corrupted JSON cause filing issues?

Yes. Always validate JSON before uploading to GST portal for filing.

Conclusion

Common GST JSON errors and quick fixes:

  • Invalid format → Re-download from portal
  • Missing fields → Check GSTIN and fp fields
  • Syntax errors → Use JSON validator (JSONLint)
  • File too large → Use our converter (handles 50MB)
  • Encoding issues → Save as UTF-8
  • Empty file → Verify correct period and return type
  • Invalid GSTIN → Verify on GST portal
  • Date format errors → Fix in billing software

Best approach:

  1. Download JSON from official GST portal
  2. Don’t edit manually
  3. Validate using our converter
  4. If errors persist, re-download

Validate and Convert Your JSON Now →


Related Articles:

Ready to Convert Your GST JSON Files?

Try our free online converter now - no registration required!

Convert JSON to Excel →