About this tool
A JSON formatter turns a dense, hard-to-read block of JSON into an indented structure you can scan, and a JSON validator tells you whether the data is correct before you send it to an API or save it in a config file.
Paste your JSON on the left and choose an action: format it with 2 spaces, 4 spaces or tabs, minify it into one line to save space, or only check it.
If something is wrong, the tool shows the line and column of the first error, a short explanation and the line itself with a caret under the problem. Why does my JSON fail to parse?
The most common causes are a trailing comma before a closing bracket, single quotes instead of double quotes, keys without quotes, and a missing comma between two items.
You can also sort object keys alphabetically, which makes two versions easier to compare. For example, {"b":1,"a":[1,2]} becomes an indented block with a first and then b.
Note that numbers larger than 15 digits lose precision in JavaScript, so keep big IDs as strings.
Everything runs inside your browser tab and nothing is uploaded, but avoid pasting real passwords or secret keys on a shared computer. For cleaning plain text instead, see the Text Cleaner on this site.
How to use
- Paste your JSON into the Input box.
- Choose Format, Minify or Validate only, then pick the indent style.
- Read the status line; if there is an error, go to the shown line and column, fix it, then copy the result.