Error while uploading JSON file for ITR Return

I have prepared income tax return u/s 139(8A) using excel utility on Income Tax portal. After that I have generated json file. The JSON file is saved by default with some path. Now when I am uploading the json file on income tax portal, it is giving error message as under:

 

SyntaxError:Unexpected token'<',"<!DOCTYPE"...is not valid JSON.

 

Please guide on how to handle this issue.

 

Replies (3)
Quick Summary
If you're encountering a 'SyntaxError: Unexpected token <' when trying to upload your ITR JSON file, it means the portal isn't receiving valid JSON. This often happens if your session has dropped and the portal returns an HTML error page instead. To fix this, try logging out and back into the Income Tax portal to start a fresh session, regenerate your JSON file from the utility, and then attempt the upload again. You can also check for common JSON formatting issues like missing commas, incorrect quotes, or mismatched brackets, and use a JSON validator to pinpoint errors.

The error message you’re encountering, “SyntaxError: Unexpected token ‘<’ in JSON at position 0”, indicates that the content you’re trying to parse as JSON is not actually valid JSON. Let’s troubleshoot this issue step by step:

  1. Check the Content Format:

    • Ensure that the content you’re uploading is indeed in JSON format and not HTML or XML. Sometimes, if the server returns an HTML page (such as an error page) instead of valid JSON, you’ll encounter this error.
    • Verify that the file you generated from the Excel utility is correctly saved in JSON format.
  2. Missing or Extra Commas:

    • Check for any missing or extra commas in your JSON file. Commas are essential to separate different elements within the JSON structure.
    • Make sure that each key-value pair is separated by a comma, except for the last one.
  3. Use Double Quotes and Escape Special Characters:

    • JSON requires double quotes around keys and string values. Ensure that all keys and string values are enclosed in double quotes.
    • If your JSON contains special characters (such as backslashes or quotes), make sure to escape them properly. For example:
      {
        "name": "John Doe",
        "address": "123 Main St, \"City\"",
        "descripttion": "This is a \"test\" descripttion."
      }
      
  4. Check for Mismatched Brackets or Quotes:

    • Make sure that all opening brackets ({ and [) have corresponding closing brackets (} and ]).
    • Verify that all quotes are properly matched (i.e., every opening quote has a corresponding closing quote).
  5. Validate Your JSON:

    • Use a tool like JSONLint to validate your JSON. Paste your JSON content into the tool, and it will highlight any errors or issues.
    • Fix any reported errors and ensure that your JSON is well-formed.

Remember that the error message you’re seeing occurs when the parser encounters unexpected characters (such as <) while trying to interpret the content as JSON. By following the steps above, you should be able to identify and resolve the issue with your JSON file. If you need further assistance, feel free to ask! 😊

 

The Unexpected token '<' error means the portal returned an HTML error/login page instead of processing your JSON upload due to a dropped session or server error. Solution: Log out, log back into the e-filing portal with a fresh session, regenerate the JSON file from your utility, and re-upload.

The error indicates the portal is returning an HTML page (beginning `<!DOCTYPE...`) where the upload process expects JSON. It does not, by itself, establish that your return JSON is defective.

  • Re-download the latest applicable Excel utility from the Income Tax portal, reopen the saved workbook in a supported desktop Excel version, and regenerate the JSON. Upload the generated `.json` file—not the Excel utility or an HTML/download file.
  • Check the file extension and size, and avoid renaming the file to `.json` if it was saved in another format. If the error persists, try signing out and back in, using an updated browser or a private window, and uploading again; the HTML response may reflect a session or portal-side issue.
  • If possible, note the exact upload step and save the error screenshot. The precise fix depends on the utility/version, browser and whether the error appears before or after selecting the file.

JSON upload is one step in the updated-return workflow, so keeping the utility and portal session aligned can help prevent repeat attempts. Manual return preparation and validation are difficult to scale; automation reduces repetitive work while leaving tax treatment and final review under professional judgment. At Jir AI, our 2,000+ AI agents and 650+ integrations streamline GST, ITR, TDS, TCS and other compliance workflows, helping reduce manual workload by up to 70%. For help simplifying your compliance workflow, connect with us on WhatsApp: https://wa.me/message/3HVOZ7HIY4ESC1

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
28 October 2026
Assistant Director/ Associate Director-Finance & Accounting

Krea University

Chennai

CA

View Details
Company
ARTICLESHIP 20 November 2026
Article clerk

Jain Sanjay Kumar & Co

Jaipur

CA Inter

View Details
Company
16 November 2026
Indirect Tax Associate

Sekhri Kanodia & Associates

Mumbai

B.Com

View Details
Company
13 November 2026
Accountant

New Mobile India

Muzaffarpur

B.Com

View Details
Company
Featured 07 November 2026
Chartered Accountant

DPV & Associates

Chennai

CA

View Details
Company
ARTICLESHIP 16 November 2026
Audit Executives

Loonker Godawat And Company

Bengaluru

B.Com

View Details
Company
ARTICLESHIP 07 November 2026
Article Assisstant

DPV & Associates

Chennai

CA Inter

View Details
Company
10 November 2026
Direct Tax Manager

CAAQ CONSULTANCY PVT LTD

New Delhi

CA Final

View Details