JSON Formatter & Validator

Format, validate, minify or key sort JSON with clear error messages. Runs in your browser, so API responses and configs never leave your device.

Runs on your device

Result

Results appear here after you select “Format”.

What it does

Paste a JSON document to check that it parses, then pretty print it with your preferred indentation, minify it for transport, or sort object keys so two payloads can be compared line by line.

How to use it

  1. Paste JSON into the input box.
  2. Choose pretty print, minify or sort keys, and the indentation width.
  3. Select Format, then copy or download the result.

Example

The example fills in realistic values and runs the tool. Select Try an example above to see it.

When it helps

  • Reading a minified API response while debugging.
  • Normalising config files before committing them.
  • Finding the exact position of a syntax error.

Questions

Does it accept comments or trailing commas?

No. It follows the JSON standard (RFC 8259) strictly, the same as JSON.parse, so the output is guaranteed to be valid JSON.

Is there a size limit?

Inputs up to about 5 million characters are accepted. Very large documents may take a moment to format on slower devices.

More developer tools

See all 25

People also use

Browse all 200 tools