JSON Formatter 🔒 Your data never leaves your browser.
Format, validate and minify JSON with precise error location.
Ctrl+Enter Format · Ctrl+Shift+M Minify · Ctrl+S Download
About this tool
This JSON formatter pretty-prints, validates and minifies JSON data. When your JSON is invalid, it points to the exact line and column of the error instead of a vague "invalid" message — no more hunting for a trailing comma or missing bracket.
Parsing uses the browser's native JSON.parse, running 100% on your machine. API responses, configs and sensitive payloads are never uploaded anywhere.
Frequently asked questions
What does "Repair" actually fix?
It handles the mistakes that show up most often in hand-edited or copy-pasted JSON — trailing commas, single quotes instead of double, unquoted keys, comments, and similar near-misses. It's not magic: badly malformed input may still need a manual fix.
What's the difference between Format and Minify?
Format re-indents the JSON for readability using your chosen indent width; Minify strips all non-essential whitespace to produce the smallest possible payload — useful before sending JSON over the wire.
What do Escape and Unescape do?
Escape wraps your text as a JSON string literal (quoting it and escaping internal quotes/backslashes/newlines) — handy when you need to embed raw text inside a JSON value. Unescape reverses that, turning a JSON string literal back into plain text.
Is my JSON uploaded to a server to be validated or formatted?
No. Parsing, formatting, and the tree view all run locally in your browser — nothing you paste here leaves your machine.
Why does the tree view limit how many items it shows at once?
Very large arrays or objects (tens of thousands of entries) would freeze the browser tab if rendered all at once, so children are loaded in batches — click "Show more" to reveal the rest.