JSON error reference

Every common way JSON.parse fails, what the message is really pointing at, and the fix. Each page has a broken example and a working one you can open in the validator.

Two things make these errors harder to read than they need to be. First, the position in the message is where the parser gave up, not where you went wrong. A missing comma usually gets reported a token or two late. Second, every engine words the same failure differently, and V8 changed its own wording around Chrome 109. What used to read Unexpected token } in JSON at position 8 now reads ...is not valid JSON with a snippet. Each page below lists the wordings you are likely to see, so you can match yours.

Not sure what JSON is yet?

Start with what is a JSON file. It covers the format, its six types, and the three mistakes behind most of the errors above. If you just need to open one, how to open a JSON file covers every platform.

The fastest way to find any of them

Paste the document into the JSON validator. It turns the parser's character offset into a line and column, highlights the spot, and repairs the mistakes that can be repaired safely. Nothing is uploaded. The parsing happens in your browser.

Your JSON and text are processed entirely in your browser and are never sent anywhere. To understand how the site is used we record each page view (the page, the referrer and an approximate location from your IP address) and keep it for 90 days. Nothing is stored on your device unless you choose it. Accept to also store a device identifier here and record your browser and device characteristics, which is what lets a return visit be told from a new one. Decline and nothing is sent at all. We respect Do Not Track. See our privacy policy.