GoWebTools

JSON Formatter and Beautifier

Format messy JSON into readable, indented output, or minify it back. Shows the exact line of any syntax error. Free and fully in-browser.

Input

Result

The result appears here as you type.

What this tool is for

An API response arrives as one unbroken line and you need to find one field in it. This indents it, sorts keys if you want a stable diff, and when the JSON is broken it points at the character where parsing failed instead of showing an empty box.

How to use it

  1. Paste the JSON.
  2. Choose the indentation: two spaces, four spaces, tabs, or minify to strip all whitespace.
  3. Fix any error shown under the input, then copy the formatted result.

Frequently asked questions

Why is my JSON invalid when it looks fine?

The three usual culprits: a trailing comma after the last item, single quotes instead of double quotes, and unquoted keys. All three are legal JavaScript and illegal JSON.

Can I sort the keys?

Yes. Sorting keys alphabetically makes two versions of the same document comparable in a diff, which is useful for configuration files.

Is my data sent to a server?

No. Parsing and formatting happen in your browser, so an API response containing customer data or tokens stays on your machine.