Format and validate JSON online. Fixes trailing commas, quotes, comments and JavaScript or Python notation. Free, in your browser.
The formatter turns one-line or messy JSON into neatly indented JSON, checks it against the RFC 8259 spec, and when it finds an error it explains it, points to the exact spot and offers a fix — even for JavaScript or Python notation.
Copy an API response, a config or an export, drop a file, or click Sample.
Indent with 2 or 4 spaces or tabs, optionally sort keys. Ctrl+Enter formats, Ctrl+G jumps to a line.
Each error shows the exact spot with an arrow and a fix button. “Fix everything” applies all safe fixes at once.
The most common reasons JSON won’t parse — with the messages browsers and Python print. If you got one of these, paste your JSON above.
JavaScript tolerates it, JSON doesn’t.
["a", "b",]→["a", "b"]Unexpected token ']', … is not valid JSON (Chrome / Node), Expecting value (Python)JavaScript or Python notation — JSON requires double quotes for strings and keys.
{'name': 'Jane', age: 30}→{"name": "Jane", "age": 30}Expected property name or '}' in JSON (Chrome / Node), Expecting property name enclosed in double quotes (Python)Python and JavaScript values JSON doesn’t know. Note: Python itself accepts NaN in JSON, other languages don’t.
{"ok": True, "x": None}→{"ok": true, "x": null}Unexpected token 'T', … is not valid JSON (Chrome / Node), Expecting value (Python)JSON has no // or /* */ — only JSONC / JSON5 do (VS Code, tsconfig).
{"port": 80 // web}→{"port": 80}Expected ',' or '}' after property value in JSON (Chrome / Node), Expecting ',' delimiter (Python)Items need commas between them, keys need a colon before the value.
{"a": 1 "b" 2}→{"a": 1, "b": 2}Expected ':' after property name in JSON (Chrome / Node), Expecting ':' delimiter (Python)Paths like C:\\temp need a doubled backslash, \' doesn’t exist in JSON, a tab is \t.
{"q": "it\'s"}→{"q": "it's"}Bad escaped character in JSON (Chrome / Node), Invalid \escape (Python), Bad control character in string literal (Chrome / Node)A closing quote or brackets are missing — typically a truncated log or export.
{"a": [1, {"b": 2→{"a": [1, {"b": 2}]}Unterminated string in JSON (Chrome / Node), Unterminated string starting at (Python)JSON Lines from logs, or JSON inside var data = … or callback(…). Combined into an array or extracted.
{"a":1}↵{"a":2}→[{"a":1}, {"a":2}]Unexpected non-whitespace character after JSON (Chrome / Node), Extra data (Python)…and more: typographic quotes, numbers like 01, +1, .5 or 0x1F, empty values, \u without 4 hex digits.
The parser hit a character it doesn’t expect there — usually an extra comma, a single quote or a comment. The browser only gives a position; the formatter shows the line, column and cause.
The spec is deliberately minimal for portability. Comments and trailing commas are allowed in JSON5 / JSONC; remove them for APIs.
Yes — the “sort keys” option and the Minify button. To convert to other formats use JSON → CSV, YAML or XML.
Yes. No sign-up, no ads and no size limit — the only limit is your computer.
No. Everything runs in your browser and the data you paste never leaves it — fine even for data with tokens or personal information.