JSON formatter and validator online
Paste JSON and the formatter checks it right away, then indents it with 2 or 4 spaces or tabs, or minifies it into one line. On an error it shows the line and column and explains the cause: a trailing comma, single quotes or an unclosed bracket. The data is processed in your browser and never sent anywhere.
Build it in the builderLoading the tool...
How to set it up
- 1
Paste JSON
Copy an API response, a config file or a request body and paste it into the "Source JSON" field. The check runs on its own, there is no button to press.
- 2
Fix errors
If the JSON is broken, the line, the column and the cause appear under the field. The "Show the error" button selects the exact character in the text.
- 3
Choose the layout
"Indented" puts every value on its own line with 2 or 4 spaces or a tab. "One line" removes spaces and line breaks, which is handy for requests and environment variables.
- 4
Sort the keys
The "Sort keys alphabetically" box orders the keys of every object at every level. It makes two API responses much easier to compare.
- 5
Copy the result
The "Copy" button puts the formatted JSON on the clipboard. Numbers and strings stay exactly as they were, long ids are not rounded.
Frequently asked questions
Build your first scheme for free
Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.
Build it in the builder