JSON formatter
Indent and validate
JSON input
Result
What you enter is never sent to a server. Everything is processed in your browser on this device.
How to use
- Paste your JSON into the JSON input box.
- Under Mode, choose Format or Minify. With Format, pick an Indent of 2 spaces, 4 spaces, or Tab.
- Turn on Sort keys if you want keys in order.
- Copy the result or save it with Download (.json).
FAQ
Can it show where my JSON is invalid?
Yes. Below the input you’ll see the position, like “Line 3, column 15”, and what went wrong. Press Go to error to move the cursor to that spot in the input.
Why do comments or trailing commas cause an error?
The input is checked against standard JSON. Comments, a comma after the last item, single-quoted strings, and unquoted keys aren’t allowed in standard JSON, so they’re flagged as errors. Remove or fix them and the result will appear.
Will large numbers or values like 1.0 be changed?
No. Numbers and strings are kept exactly as written, so a big integer like 12345678901234567890 isn’t rounded and 1.0 doesn’t turn into 1. Only whitespace and line breaks are rearranged.
How does Sort keys order things?
Object keys at every level are sorted by character code, so keys starting with a capital letter come before lowercase ones. Array order is left unchanged.
Can it handle very large JSON?
There’s no set size limit. Input over 100 KB is processed in a background thread (Web Worker), so the page stays responsive while it works. It still uses your device’s memory, so files of tens of MB may be slow. There’s no file picker, so paste the content in.
