JSON Formatter & Validator
Paste JSON in the left box, then click Format to beautify it. Click Minify to compress it onto one line. Errors are shown with the offending line number.
Features
How to Use
1. Paste your JSON into the input box on the left.
2. Choose an indentation (2 spaces / 4 spaces / Tab).
3. Click Format to beautify, or Minify to compress.
4. Click the Copy button to copy the result.
About this tool
JSON is the default language of APIs, configuration files and logs, and it is unforgiving: one trailing comma or unquoted key makes the whole document invalid. This formatter parses your JSON with the browser's strict JSON parser, reports the line where parsing failed, and pretty-prints valid data with two spaces, four spaces or tabs. The result is shown as a collapsible tree, so you can fold large arrays and objects and expand them all again with one click. Minify removes all optional whitespace for compact payloads. Copy the output or download it as a file, or drag a .json file straight onto the input. Documents over a megabyte show a processing indicator while they are parsed.