JSON error reference

Unexpected end of JSON input

The parser reached the end of the text while it was still expecting another value or closing character.

01

Why it happens

  • Missing closing brace or bracket
  • Unclosed quotation mark
  • Truncated network response
  • Incomplete copied content
02

Guide

Invalid
{
  "items": [1, 2, 3]
Valid
{
  "items": [1, 2, 3]
}
03

Common parser messages

Unexpected end of JSON inputEnd of data while reading object contentsUnterminated string
04

How to fix it

  1. 1

    Inspect the final lines of the document.

  2. 2

    Count unmatched braces and brackets.

  3. 3

    Check for an open string.

  4. 4

    Retrieve the response again if it may be truncated.

  5. 5

    Do not guess missing business data.

Jump to tool

Open broken example in JSON Repair

JSON Repair Tool