JSON Formatter
Pretty-print, minify or sort JSON. Errors show their line and column, and Repair fixes the usual mistakes.
The result appears here as you type.
How to use this tool
- Paste or open your JSONPaste it, open a .json file, or load the sample. The output updates as you type.
- Choose the layoutIndent with 2 or 4 spaces or a tab, or Minify for one line. Sort keys A to Z if you want to compare by eye.
- Copy or downloadCopy the result, download it as a file, or send it back into the input to keep working.
What problem does this solve?
Minified API responses and log lines are unreadable on one line, and a single misplaced comma breaks the whole document. This formatter lays JSON out with your choice of indent, keeps every number and string exactly as written, and points at the line and column of any error.
Who needs this?
- Developers reading API responses and webhook payloads
- Anyone tidying a config file before committing it
- Support and QA staff pasting JSON out of logs
You might also need
FAQ
Is my JSON sent to a server?
No. Formatting runs in your browser with JavaScript. Nothing you paste is uploaded, logged or put in the page address.
Will formatting change my numbers or strings?
No. Numbers keep the exact digits you wrote, so a 20-digit id is not rounded, and 1.0 stays 1.0. Strings keep their escapes. Only the whitespace between values changes.
How large a file can it handle?
Tens of megabytes. Up to 2 MB the output updates as you type; above that, live updates pause and a Run button formats on demand so typing stays smooth.