JSON Formatter & Validator

A minified API response is unreadable, and a missing comma buried three hundred lines deep is worse. This formatter pretty-prints JSON with configurable indentation, validates it with an error message that names the position of the problem, and minifies it again when you need to ship it.

How to use it

  1. Paste your JSON into the left panel.
  2. Press Format to indent it, or Minify to strip every unnecessary byte.
  3. If it is invalid, read the error message — it names the character position of the fault.
  4. Copy the formatted result, or sort keys alphabetically to make two documents comparable.

Frequently asked questions

Why does my JSON fail to parse?

The three usual causes are a trailing comma after the last item, single quotes instead of double quotes, and unescaped newlines inside a string. Strict JSON allows none of them, even though JavaScript object literals do.

Are comments allowed in JSON?

No. The specification has no comment syntax. Variants like JSONC and JSON5 add them, but a standard parser will reject a document containing // or /* */.

Does formatting change my data?

No. Whitespace between tokens has no meaning in JSON, so formatting and minifying are lossless. Key order is preserved unless you explicitly sort.

Is my JSON uploaded to a server?

No. Parsing uses the browser’s built-in JSON engine, so API keys, tokens, and customer data in your payload never leave the machine.

All free tools · Blog · About · Contact

Also available in: Español · Português · Français · Deutsch