JSON Beautifier
Expand a compact, single-line payload into properly indented JSON that is comfortable to scan and review.
Your data stays on your device
Input — JSON
- characters
- 0
- lines
- 0
- size
- 0 B
Output — Beautified JSON
- characters
- 0
- lines
- 0
- size
- 0 B
Options
Makes two documents comparable with a plain text diff.
Keeps integers beyond 2^53-1 exactly as written instead of rounding them. Key sorting is skipped in this mode.
About this tool
Beautifying JSON is the reverse of minifying it: the tool re-inserts the whitespace that machines strip out, giving each key, value and array element its own line at a consistent depth. The data is untouched — only its presentation changes.
Because the input is fully parsed before it is re-printed, a beautified document is guaranteed to be valid JSON. If the input cannot be parsed you get the exact line and column of the problem instead of silent, half-formatted output.
How to use this tool
- Paste compact JSON, or drop a .json file onto the input panel.
- Choose how deep each level should indent: 2 spaces, 4 spaces or a tab.
- Turn on key sorting if you want a stable, alphabetised layout.
- Press Beautify, then copy the result or download it as a .json file.
Key features
- Indent with 2 spaces, 4 spaces or tabs
- Optional recursive key sorting for predictable output
- Parse errors reported with line, column and a likely cause
- Copy to clipboard or download as .json
- Works offline once the page has loaded
Example
Input — JSON
{"id":1,"tags":["a","b"],"ok":true}Output — JSON
{
"id": 1,
"tags": [
"a",
"b"
],
"ok": true
}Good to know
- The input must be valid JSON. To fix broken input first, use the JSON Repair tool.
- Integers beyond 2^53-1 lose precision when re-printed, as they do in any JavaScript-based tool.
Frequently asked questions
What is the difference between beautify and format?
They describe the same operation — parsing JSON and printing it with indentation. This page is tuned for expanding minified payloads back into readable form.
Does beautifying change my data?
No. Only whitespace is added. Keys, values, ordering and types stay exactly as they were unless you explicitly enable key sorting.
Is my JSON sent to a server?
No. Parsing and printing happen locally in your browser tab, so nothing you paste leaves your machine.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.