Paste messy or minified JSON and get clean, indented output — with validation that points at the exact line and column of the first error. Free, no signup, nothing uploaded.
Ready. Paste your JSON and press Format.
Every developer has lived this moment: you paste a payload into a formatter, click Format, and get “Error: Parse error on line 42 — expecting STRING, got }” — because of one tiny trailing comma. Now you have to hunt the error down by hand, fix it, and try again. That is the number-one complaint about JSON tools, and the second is privacy: developers paste production API responses containing user data — sometimes database credentials — into a random website that probably logs it. The third is the tools that only say “invalid” and offer no help: no line number, no column, no hint about which of the five usual mistakes it is. What developers actually want is a formatter that points at the exact character, names the likely cause, and never sends their data anywhere — plus minify for transport and sort-keys for stable diffs.
Paste your JSON above and press Format — it is beautified with your chosen indentation and validated at the same time. If it is invalid, the status line shows the exact line and column of the first error, with the line shown and a caret (^) under the problem character, plus the most likely cause. Press Minify to compress it to one line. It is free, with no signup, and everything runs in your browser.
A JSON formatter (also called a JSON beautifier or pretty printer) takes raw, compressed JSON and reformats it with consistent indentation and line breaks so it is easy to read, review and debug. A validator confirms the syntax is correct. This tool does both, and minifies too — all in your browser, with nothing uploaded to a server.
Step 1: paste your JSON into the input box. Step 2: choose an indentation (2 spaces, 4 spaces or tab) and press Format — or Minify to compress it. Step 3: if there is an error, read the line and column, fix the character under the caret, and press Format again. Then copy or download the result.
Format (beautify): use when you want to read JSON — inspecting an API response, reviewing a config file, or debugging a data feed. Minify: use when you want the smallest output — reducing payload size, embedding JSON compactly, or storing it on a single line. Validate: happens every time you press Format; the status flags valid or invalid, and an invalid result shows the parser's message with the position of the first syntax error, so you catch mistakes before shipping.
| Error | Example | Fix |
|---|---|---|
| Trailing comma | { "a": "b", } | Delete the comma before } or ] |
| Single quotes | { 'key': 'value' } | Use double quotes for keys and strings |
| Unquoted keys | { key: "value" } | Quote every key: { "key": "value" } |
| Comments | { // note "a": 1 } | JSON has no comments — remove them |
| Wrong true/false/null | { "x": True } | Use lowercase true, false, null |
A JavaScript object literal and JSON look almost identical, which is why so much invalid JSON starts life as copied JavaScript. JSON is a strict subset: a JS object allows single quotes, unquoted keys, trailing commas, comments, undefined and NaN. JSON allows none of those. Same object, two syntaxes:
| Feature | JavaScript object — valid | JSON — invalid |
|---|---|---|
| Quotes | Single or double quotes | Double quotes only, for keys and string values |
| Keys | Unquoted keys allowed: { name: "Ava" } | Every key must be quoted: { "name": "Ava" } |
| Trailing comma | Allowed since ES5 | Not allowed — kills the whole file |
| Comments | // and /* */ allowed | No comment syntax at all |
| Values | undefined, NaN, Infinity allowed | Use null or a number instead |
| Booleans | true / false | true / false — but not Python's True / False / None |
If you would rather not paste a payload into any web page at all, the same check runs locally. In a browser console, paste the JSON into JSON.parse('...') — the error message tells you the exact character position where it broke. In a terminal, python3 -m json.tool pretty-prints a file, and jq . does the same with far more power. This page is the same idea with a friendlier error: the line, the column, and the likely cause, instead of a bare parser message.
Yes. Format, validate and minify as much JSON as you like, free, with no signup, no account and no limits.
A tool that takes raw, compressed JSON and reformats it with consistent indentation and line breaks so it is easy to read, review, and debug. Also called a beautifier or pretty printer.
Format means pretty-print for reading; minify means compress to one line for smallest size; validate means confirm the syntax is correct. This tool does all three — validation happens every time you press Format.
Find the first error and fix that one thing — the parser stops at the first error, so fix and revalidate one at a time. The usual culprits are a trailing comma, single quotes, an unquoted key, a comment, or a Python-style True or None. This tool shows the line, the column and the likely cause.
JSON does not allow a comma after the last item in an object or array, even though JavaScript does. Delete it. It is the single most common JSON error.
No. Keys and string values must use double quotes — no exceptions. JavaScript allows both; JSON only allows double quotes.
No — JSON has no comment syntax. Neither // single-line comments nor /* */ block comments are valid anywhere in a JSON document. Use JSONC in your editor if you need comments, but strip them before sending to an API.
A JavaScript object allows single quotes, unquoted keys, trailing commas, comments, undefined and NaN. JSON allows none of those — it is a strict subset of JavaScript object syntax.
Paste it into JSON.parse('...') — the error message tells you the exact character position where it broke. Or use python3 -m json.tool or jq . in the terminal. This page is the same idea with a friendlier error: line, column and likely cause.
Remove all unnecessary whitespace — one click in a formatter. Minify for production payloads, format for reading.
Only if it runs client-side. Nothing you paste here is uploaded — this tool uses the browser's built-in JSON parser, which matters when the payload contains API keys, customer records, or internal responses. If a page does not say processing is local, do not paste secrets into it.
A query language to extract values from JSON — for example, pull one field out of a large response without copying the whole blob. This tool does not have a JSONPath filter; use it to format and validate, then query the result elsewhere.
2-space indent is the most common. Tabs are fine too. What matters is consistency — mixed indentation makes diffs unreadable.
Only mechanical errors: trailing commas, single quotes, unquoted keys, missing brackets. It cannot fix wrong values, wrong structure, or missing data — that is your data, not syntax. This tool does not auto-fix at all: it points at the first error and tells you the likely cause, and you fix it yourself.
Usually a trailing comma or a missing value before the closing brace — the parser found } where it expected another property or value. Check the character just before the }.
Why does JSON not allow trailing commas? The JSON standard (RFC 8259) simply does not include them. JavaScript objects allow them, which is why they creep in — but a JSON parser rejects them.
Can JSON have comments? No. JSON has no comments. If you need them, use JSONC in your editor — but strip them before sending the data to an API.
What indent should I use for JSON? 2-space indent is the most common. Tabs are fine too — what matters is consistency, because mixed indentation makes diffs unreadable.
How big a file can I format here? There is no server limit, but very large pastes (many megabytes) can slow the browser tab. For huge files, a desktop tool or jq is faster.