How to format JSON
- Paste your JSON into the left box. It is checked as you type.
- Choose Format for readable, indented output, or Minify to remove all spaces.
- Copy the result from the right box.
The formatter follows the JSON standard strictly, so anything it accepts will also parse in JavaScript, Python, and other languages.
Questions
Is my JSON sent to a server?
No. Formatting and validation run in your browser with its built-in JSON parser. You can even use the page offline once it has loaded.
What does "Sort keys" do?
It orders the keys of every object alphabetically, at every level. Arrays keep their order. This makes two JSON files easier to compare.
Why is my JSON invalid?
Common causes are trailing commas, single quotes instead of double quotes, comments, and keys without quotes. The error message shows the line and column where parsing stopped.
Credits
Built by OneTooling using standard browser features. No third-party code runs on your data.