Expected double-quoted property name
{
"a": 1,
}- Why:
- A trailing comma after the last member. Valid in JavaScript object literals and in JSON5, not in JSON.
- Fix:
- Delete the comma before the closing brace or bracket.
JSON & Data
Paste JSON to reformat it with consistent indentation. Syntax errors are reported with the exact line and column so you can jump straight to the problem.
This tool runs entirely in your browser. Your input is never uploaded, stored or logged.
Formatting is a parse-and-reprint, not a text transformation. The input is parsed into real values — objects, arrays, numbers, strings — and then written back out with consistent indentation. Nothing is rewritten with regular expressions, so a string containing a brace or a comma cannot confuse it.
Because the document is fully parsed first, invalid input cannot be partially formatted. Either the whole document is valid and you get formatted output, or parsing stops at the first error and you get its line and column. That is why the tool never returns half-formatted text.
Reprinting normalises some things without changing meaning: numbers lose insignificant trailing zeros, escape sequences are written in their shortest valid form, and duplicate keys collapse to the last one that appeared. JSON objects are unordered by specification, so none of that changes what the document means to a parser.
Every example below is run against this tool in our test suite, so what it says here is what the tool actually does.
{
"a": 1,
}{'a': 1}{a: 1}{"n": NaN}Last updated