Format and minify
Pretty-print with 2 spaces, 4 spaces, or tabs, or strip every byte of whitespace. The size before and after is shown so you can see what you saved.
Paste JSON to format, validate, beautify, or minify it, then explore the result as a collapsible tree. Everything runs in your browser. Nothing is uploaded.
Paste your JSON here
or drop a .json file anywhere here
Formatted output appears here.
Everything below is part of the editor above — there is no upsell and no second page to visit.
Pretty-print with 2 spaces, 4 spaces, or tabs, or strip every byte of whitespace. The size before and after is shown so you can see what you saved.
Invalid JSON reports the line, the column, the offending source line with a caret under it, and a plain-language explanation of what the parser expected.
Trailing commas, single quotes, unquoted keys, // comments, Python True/None, JSONP wrappers, and newline-delimited JSON are all recoverable in one click.
Nodes render only when you open them and long arrays load in chunks, so a multi-megabyte document expands without locking the tab.
Search walks the parsed data rather than the visible DOM, so matches inside collapsed branches are still found — then the tree opens to reveal them.
An array of objects becomes a sortable-width grid with the union of every key as columns, and exports to CSV in one click.
Every tree row copies its own value, or the JSONPath expression that reaches it — $.limits.retry.attempts — ready to paste into code.
Object and array counts, total and unique keys, value counts, maximum nesting depth, and document size, recalculated as you type.
No ads, no cookie banner, no sign-in wall, no “save online” prompt. Every action has a shortcut and the tree follows the ARIA tree pattern.
A JSON formatter parses a document and writes it back out with newlines and indentation, so a payload that arrived as one long line becomes something you can read. On this page the same pass also validates: input that parses is re-indented and rendered as a tree, and input that does not stops at the first syntax error with the line, column, and offending character named. Formatting only touches the whitespace between tokens — your keys, values, and order come back unchanged.
Parsing uses your browser’s own JSON.parse, so the document is never sent anywhere and the tool keeps working with the network disconnected.
That covers API responses you are debugging, configuration files, log lines with JSON embedded in them, and fixtures you are checking before they go into a test.
Every page below runs this same editor, opened on the panel that suits the task and written up in more depth: the JSON formatter covers indent choices and the equivalent jq and Python commands, theJSON validator catalogues the syntax errors developers hit most often, the JSON viewer explains searching and path copying in large documents, the JSON beautifier deals with minified and escaped input, and the JSON minifier shows what whitespace actually costs in bytes. There is alsoJSON pretty print for key sorting, aJSON diff that compares two documents by path, and converters forJSON to CSV, JSON to YAML, andJSON to XML.
The right one is whichever handles your document without getting in the way. Worth checking before you settle on one: does it validate as well as indent, does it name the exact line and column when parsing fails, can it open a multi-megabyte file without freezing the tab, and does your data leave the browser? This page formats, validates, beautifies, and minifies JSON, then shows the result as a collapsible tree, a table, or indented text — with no account, no ads, and no upload, because every parse runs locally on your own machine.
A JSON formatter is a tool that parses a JSON document and writes it back out with consistent newlines and indentation, turning a single-line API response into something a person can read. Because it has to parse the input first, a formatter is also a validator — anything that will not parse stops with an error instead of being reformatted. Formatting only changes the whitespace between tokens, so your keys, values, types, and order come back exactly as they went in.
A formatter answers “how do I read this?” and a validator answers “is this correct?”. The same parse does both, which is why this page reports syntax errors while it formats. The separate JSON validator is for when checking is the whole job: it opens on the error panel and gives the line, the column, the offending source line with a caret under it, and a plain-language note about what the parser expected. Neither checks your document against a JSON Schema — that is a question about shape, not syntax.
Start at the reported position, because most failures are a single character. The usual culprits are a trailing comma before } or ], single quotes instead of double quotes, unquoted property names, // comments, and Python’s True/False/None — all legal in JavaScript or Python, none of them legal in JSON. Press Repair and each of those is rewritten, along with JSONP wrappers and newline-delimited records, so you can format the result straight away.
Paste the document and press Minify: whitespace between tokens is stripped and the size before and after is shown, so you can see what you actually saved. It pays off for payloads you are about to send over the wire or store, and costs you nothing to undo — Format reverses it exactly, byte for byte. The JSON minifier opens directly on that view.
Yes. The tree view expands and collapses any branch, and search walks the parsed data rather than the visible DOM, so a match buried inside a collapsed object is still found and the tree opens to reveal it. Every row copies its own value or the JSONPath that reaches it. Rows are built only when you open them and long arrays load in chunks, which is what keeps a big document responsive. The JSON viewer goes into more detail.
It is free, with no sign-in and no cap on how many documents you run through it. No extension is needed either — this is an ordinary web page, and because parsing happens in your browser rather than on a server it keeps working after you go offline. Alongside formatting there is a JSON beautifier for minified or escaped input and a JSON diff for comparing two documents by path.
Data handling
Most online formatters POST your document to a backend to format it. This one does not need to — everything a JSON tool has to do is already available client-side.
Your JSON is handed to the browser’s own JSON.parse. There is no API call, no server round trip, and no request that carries your document.
Upload and drag-and-drop read the file with the local File API. The bytes never leave the machine — you can format JSON with the network disconnected.
No analytics, no ad network, no CDN calls, no embedded widgets. Fonts are compiled into the site at build time, so the page loads only from this origin.
Your most recent document is kept in this browser’s localStorage (up to 500 KB) so a refresh does not lose your work. It stays on your device, and Clear removes it.
Verify it yourself: open your browser devtools, switch to the Network tab, and format a document. You will see no requests. Or load the page, go offline, and keep working.
Every action has a keyboard path. The tree follows the ARIA tree pattern, so arrow keys move between nodes without touching the mouse.
| Keys | Action |
|---|---|
| Ctrl / ⌘ + Enter | Format and pretty-print the document |
| Ctrl / ⌘ + Shift + M | Minify the document |
| Ctrl / ⌘ + K | Focus the tree search box |
| Enter / Shift + Enter | Next / previous search match |
| Ctrl / ⌘ + Shift + C | Copy the output |
| Ctrl / ⌘ + S | Download the output |
| Tab | Insert indentation in the editor |
| ↑ ↓ ← → | Move, expand, and collapse tree nodes |
No. The page calls the browser’s built-in JSON.parse, and file upload uses the local File API. There is no backend involved in formatting, validating, or viewing. You can disconnect from the network after the page loads and everything still works.
Nothing — they are three names for the same operation: re-serialising JSON with newlines and indentation so a human can read it. The output is byte-identical whichever page you start from.
Documents of several megabytes are comfortable. The tree only builds DOM for nodes you open, and arrays load 200 children at a time. Above roughly 1.5 MB the editor stops re-parsing on every keystroke and waits for you to press Format, so typing stays smooth.
The usual causes are a trailing comma before a closing bracket, single quotes instead of double quotes, unquoted property names, // comments, or Python’s True/False/None. All of these are valid JavaScript or Python but not valid JSON. Repair fixes each of them.
Validation uses the browser’s own parser, which implements RFC 8259 / ECMA-404. That is the same parser your application code will use, so a document that passes here will parse in production.
Yes. Sort keys orders object properties A→Z at every level of nesting. Array order is data rather than formatting, so it is left untouched.
Your most recent document (up to 500 KB), your indentation choice, your view preference, and your theme — all in localStorage on your own device, so a reload does not lose your work. Clear removes the document.
Paste the quoted string and press Unescape. A log line like "{\"id\":7}" becomes real JSON you can browse in the tree.
Same engine, same privacy — every page runs entirely in your browser.
Indent JSON with 2 spaces, 4 spaces, or tabs, then copy or download the result.
Expand, collapse, and search a JSON tree; copy any value or its path.
Find syntax errors with exact line, column, and a suggested fix.
Strip whitespace and see the byte savings before and after.
Turn minified or broken JSON into clean, highlighted output.
Readable indentation with optional deep key sorting.
Flatten an array of objects into spreadsheet rows, quoted correctly.
Parse CSV — quotes, embedded commas, any delimiter — into JSON records.
Config-ready YAML with no folded strings and no anchors.
YAML 1.2 parsing, multi-document streams, errors reported by line.
Arrays repeat their tag; @keys become attributes.
Entities, CDATA, and namespaces handled by the browser’s XML parser.
Compare two documents by path — key order and indentation are ignored.