JSON Formatter
Format messy JSON into properly indented, readable structure — or minify it back down to a single line with every unnecessary character stripped out. Both directions are one click, which covers the two things anyone actually does with a JSON file: read it, or make it small enough to send somewhere.
Before you start
What does formatting JSON change?
Formatting adds indentation to make valid JSON easier to read. Minifying removes unnecessary whitespace. Neither mode repairs invalid JSON or checks an API schema; review error messages and avoid treating this tool as a lossless editor for very large numeric identifiers.
Use JSON Validator to check syntax or JSON to CSV to turn records into a table.
How to format JSON
- Paste your JSON.
- Tap Format for readable, indented JSON, or Minify to compact it.
- Copy the result from the output box.
When you'd use this
- Reading an API response — A response that arrives as one enormous line is unreadable until it is indented.
- Debugging — Formatted JSON makes a missing bracket or a misplaced comma obvious at a glance.
- Config files — Tidying a hand-edited settings file before committing it.
- Minifying for transfer — Stripping whitespace before sending JSON over a network.
Good to know
- Format and minify, both ways — Format adds indentation for reading; minify removes every optional character for size. The data itself is identical either way.
- Invalid JSON is reported, not guessed at — If the text will not parse, the tool says so rather than quietly producing something subtly wrong.
- Key order is preserved — Objects keep the order they arrived in, which makes comparing a before and after straightforward.
- Nothing is uploaded — Parsing runs in your browser — which matters more than usual here, because JSON pasted into a formatter routinely contains tokens and customer data.
Frequently asked questions
What happens if my JSON is invalid?
You'll see a clear error message explaining what's wrong, instead of a blank or broken result.
Is my JSON uploaded anywhere?
No — formatting happens entirely in your browser.
Is my JSON sent to a server?
No. Parsing and formatting happen entirely in your browser. That matters because JSON pasted into a formatter often contains API keys, internal identifiers and real customer records.
What is the difference between formatting and minifying?
Formatting adds indentation and line breaks so a person can read the structure. Minifying removes every unnecessary character so a machine can transfer it faster. The underlying data is the same.
Why does it say my JSON is invalid?
Usually a trailing comma after the last item, single quotes instead of double, or an unquoted key. All three are legal in JavaScript object syntax but not in JSON, which is exactly why they slip in.