JSON Formatter

Validate, format, and minify raw JSON data.

Indentation:
Input
Result
anyTools JSON Workspace

Formatting and validating JSON

JSON from an API response or a config file usually arrives minified onto a single line, which makes its structure hard to read. This tool re-indents it, shows it as a collapsible tree, and points to the position where parsing failed when the syntax is broken.

How to use it

  1. Paste your JSON into the input box.
  2. Press Format to see the indented output and the tree view.
  3. Use Minify to shrink it again before sending.

Frequently asked questions

Can JSON contain comments?
Standard JSON has no comment syntax. A // or /* */ makes the document invalid, so reach for JSON5 or YAML if you need comments.
Is the data I paste uploaded anywhere?
No. Parsing and formatting happen in your browser, so you can paste sensitive API responses without them leaving the machine.