Your input is processed in this browser

Developer guide

How to fix invalid JSON

Find common JSON syntax errors and fix them without uploading your data.

Open JSON formatter

Start with the error location

Paste your JSON into the formatter and choose Format and validate. The error includes a line and column when the browser parser provides a location. The editor selects that position. Check the characters just before it too: a missing comma can make the following key look like the problem.

Use double quotes

JSON property names and string values use double quotes. Single quotes and unquoted keys are JavaScript syntax, not JSON.

{"name": "Ada", "active": true}

Remove trailing commas and comments

The last property or array item must not have a comma after it. JSON also does not support // or /* */ comments. Remove comments only when they are outside quoted strings.

Check values and closing brackets

Use lowercase true, false, and null. Values such as undefined, NaN, and Infinity are not JSON. Every opening brace or bracket needs a matching close. Escape quotes inside strings with a backslash.

Keep the original when precision matters

This formatter uses JavaScript numbers. Very large integers and high precision decimal values can change during parsing and formatting. Keep identifiers as strings where your API permits it, and preserve the original input when exact numeric representation matters.