JSON Formatter
Paste minified JSON and get it back readable, or go the other way and squash it onto a single line. Sort the keys and copy the result. We never see your data — it all happens in your browser.
What you can do with it
- • Beautify a wall of minified JSON into indented, readable lines
- • Minify back down to one line when you need the smallest payload
- • Sort object keys alphabetically, so two versions of the same file line up when you compare them
- • Copy the formatted result, or download it as a
.jsonfile - • Format, minify, and sort files up to 10 MB right in the editor
Example: the same data, formatted and minified
An API hands you this, all on one line:
{"user":{"id":482,"name":"Ada Lovelace","roles":["admin","editor"]}}Formatted with two-space indentation, the shape becomes obvious:
{
"user": {
"id": 482,
"name": "Ada Lovelace",
"roles": ["admin", "editor"]
}
}Both are the same JSON. Nothing but whitespace changed, which is why you can format a file to read it and minify it again before sending it without altering a single value.
What happens with a file over 10 MB
Formatting, minifying, and sorting all happen in a text editor — past about 10 MB, reflowing that much text in the main thread is what locks up the tab, not the reading or parsing. Rather than pretend to handle it and freeze on you, the toolbar disables those actions above that size.
If your file is mostly a matter of reading rather than reshaping, the Large JSON Viewer opens files up to 500 MB by skipping the text editor entirely — it parses in a background worker and renders a tree you explore instead of formatted text you scroll. It does not reformat or minify, since there is no text buffer to rewrite.
If it will not format
A formatter has to parse before it can print, so invalid JSON comes back as an error rather than tidy output. Trailing commas, single quotes instead of double, unquoted keys, and comments are the usual causes — all common in files a human hand-edited. JSON Repair fixes those first, then you can format the result.
FAQ
Is this JSON formatter free?
Yes — free, with no signup and no limit on how often you use it. It runs entirely in your browser.
Does my JSON get uploaded to a server?
No. We never see your data. Formatting, minifying, and sorting all happen inside your own browser tab, so your JSON never leaves the machine you are sitting at.
What is the difference between formatting and minifying?
Formatting adds line breaks and indentation so a human can read the structure. Minifying strips every space and newline so the file travels over a network as few bytes as possible. Both describe exactly the same data — only the whitespace differs.
Can it format a very large JSON file?
Interactively, up to about 10 MB — past that the toolbar disables formatting rather than freeze the tab trying. For anything bigger, the Large JSON Viewer opens files up to 500MB for browsing the structure, though it does not reformat or minify.
Need to explore the structure rather than reshape it? Use the JSON Viewer.