JSON formatter
Format, validate and tidy JSON with clear error messages.
Paste JSON to format and validate it as you type. If it is invalid you get the parser's own message and the input is highlighted, so you can find the problem instead of hunting for it.
How to use it
- Paste your JSON into the input box.
- Choose an indent size, or minify, and optionally sort the keys.
- Copy the formatted output.
Why use this tool
Completely private
Everything runs inside your browser. Your files and text are never sent to a server.
Free, with no limits
No sign-up, no watermarks and no cap on how many times you can use it.
Instant results
There is no upload or queue to wait for, so results appear as fast as your device can work.
Works on any device
Runs in any modern browser on phone, tablet or desktop. Nothing to install.
Frequently asked questions
- Is my JSON sent anywhere?
- No. It is parsed and formatted entirely in your browser, which matters because JSON being debugged often contains API keys, tokens or customer records. Nothing is transmitted or logged.
- What does sorting keys do?
- It orders object keys alphabetically at every level, leaving array order untouched since that carries meaning. It is useful for comparing two API responses that contain the same data in a different order.
- Why does my JSON say it is invalid?
- The most common causes are a trailing comma after the last item, single quotes instead of double, or unquoted keys — all valid JavaScript but not valid JSON. The message shown is the parser's own, including the position where it gave up.
- Can it handle large files?
- Formatting happens on every keystroke, so very large documents — several megabytes — may feel sluggish while typing. Pasting the whole thing at once works fine.
- Does formatting change my data?
- No, only whitespace, unless you turn on key sorting. Values, types and array order are preserved exactly, and numbers are re-serialised in the same form JSON uses.