JSON Parse Error: Causes, Messages and How to Fix It

By Free JSON Tools team · Published 18 November 2026 · Updated 18 November 2026

A JSON parse error means a program tried to read text as JSON and found something the JSON rules do not allow. The message usually points to a position in the text, but it rarely explains what went wrong in plain language. This guide explains what the error means, what the common messages say, the six causes behind most failures, and a calm step-by-step method for finding the fault.

Photo coming soon. A matched original photograph for this page is being sourced. The tool and guide below are complete and fully working.
Check your JSON now. Paste it into the free JSON validator — it reports the exact line, column and cause of the first error, and nothing you paste ever leaves your device.

What a parse error means

When a program parses JSON, it reads the text character by character and expects exact JSON grammar: double-quoted strings, commas in the right places, matching brackets. The moment it meets an unexpected character, it stops and reports a parse error. Nothing is loaded — the whole document is rejected because of the one fault.

A parse error is about shape, not meaning. It says the text is not well-formed JSON; it says nothing about whether the data would have been sensible. The fastest first step is to paste the text into the free JSON validator, which shows the first error and its position. If the message says the input ended unexpectedly, the guide to Unexpected end of JSON input covers that case in detail.

What the error messages look like

Every parser reports the same kind of problem in its own words, so the message you see depends on the tool or language reading the JSON. The wording differs, but the useful part is usually the same: what was found, what was expected, and where. The table below shows messages whose exact wording is certain, and describes the rest generically.

EngineMessageUsually means
JavaScript (V8)Unexpected end of JSON inputThe input was empty or cut off before the document finished.
PythonExpecting value: line 1 column 1 (char 0)The input was empty, so no value could be read at all.
PythonExpecting property name enclosed in double quotesA key was single-quoted or left unquoted.
jq and other toolsThe message names the unexpected character and its position.Read the position, then inspect the text at and just before it.

Do not rely on the wording alone. The same mistake can produce different messages in different engines, and the position is almost always more useful than the words. If the message names a line and column, go there first; if it only names a character position, count from the start of the raw text.

The six causes behind most parse errors

Almost every parse error traces back to one of six causes. Work through them in order when you are stuck:

A step-by-step way to find the fault

Parse errors reward patience. Follow this order, and resist the urge to rewrite the whole document:

  1. Validate first. Paste the text into the JSON validator and note the first error and its position.
  2. Go to the reported position. Look at the character it names and the characters just before it. The real fault often sits slightly earlier than the reported spot.
  3. Check the raw text. Look at the plain text, not a rendered or formatted view. Hidden characters, a stray quote, or a missing bracket show up there first.
  4. Check the start and the end. Make sure the text begins with valid JSON and ends with the matching closing bracket. Empty input and cut-off files fail here.
  5. Fix one thing at a time. Change a single fault, then validate again. Fixing several things at once makes it hard to tell which change helped.
  6. Check the source. If the text came from a file or a web response, confirm the source itself is complete before blaming the text you pasted.

Preventing parse errors

The most reliable prevention is to stop writing JSON by hand: build the data in your language and let a library turn it into JSON text, so quoting, commas and escaping are handled for you. Text assembled by joining strings is where most of these errors are born.

When you receive JSON from elsewhere, check the response before parsing it. An error page or an empty body will fail as JSON, and the parse error hides the real problem — a quick look at the raw response often shows the JSON was never the issue.

Finally, be careful with text copied from documents, chat messages, and web pages. Copying can add curved quotes or drop brackets that are hard to see but easy for a parser to trip over. Pasting into the validator first catches those faults early.

Frequently asked questions

What does a JSON parse error mean?

It means a program tried to read text as JSON and found something the JSON rules do not allow. The text is rejected as a whole, and no data is loaded, until the fault is fixed.

Why does JSON only allow double quotes?

The JSON standard, RFC 8259, defines strings with double quotes only. Single quotes are not part of the grammar, so every standard parser rejects them, even though JavaScript itself allows both.

Are trailing commas allowed in JSON?

No. A comma after the last item in an object or array is a parse error in JSON, even though some languages allow it. Remove the comma and the text will usually pass.

Why does the error point to the wrong place?

The reported position is where the parser gave up, often just after the real fault. A missing comma only becomes visible when the next value appears, so inspect the characters just before the reported spot too.

How do I fix an empty input error?

Empty input means there was nothing to parse: a missing file, an empty response, or a variable that was never filled. Find out why the text is empty, then parse the real content.

Can I put comments in JSON?

No. JSON has no comment syntax, and any comment text makes the document invalid. Keep notes outside the JSON file, or use a separate field if the data itself must carry a note.

Why does JSON that looks correct still fail?

The usual reasons are invisible: characters copied from another app, a missing bracket far from where you are looking, or a single quote hiding among double quotes. Validating the raw text and reading the reported position finds these faults.

Related tools and guides

Sources

Share:
Disclaimer: The tools and guidance on this page are for general use. Tools run entirely in your browser and your input never leaves your device. Always keep a backup of important data before converting or editing it.