About this tool
Paste your JSON on the left and press Format / Beautify to get clean, indented output, Minify / Compact to remove whitespace, or Validate to check the syntax. If the JSON is invalid, the Error button and message show the line and column and take you to the problem.
Features
- Validate JSON syntax with a clear Success or Error result.
- Beautify JSON with readable 2-space indentation.
- Minify JSON to the smallest valid form.
- See the number of elements in an array, or the map size and the number of keys at level 1 of an object.
- Open a file, copy the output, view it fullscreen, and save it as a named code to share by link.
Frequently asked questions
How do I validate JSON online?
Paste the JSON and press Validate. A green Success button means the syntax is valid. A red Error button shows what is wrong and where.
What is the difference between format and minify?
Format adds line breaks and indentation so people can read the JSON. Minify removes all unnecessary whitespace so the file is as small as possible.
Does the formatter change my data?
No. Keys, values and their order stay the same. Only whitespace changes. Very large or very small numbers are written in their standard JSON form.