JSON Formatter (beautify · minify · validate)

Paste JSON and press a button to format, minify or validate it.

🔒 Your input is never sent to a server.

How to use
  1. Paste JSON into the input box and press Format to get indented output.
  2. Minify removes all whitespace, and Sort keys sorts the keys of every object alphabetically.
  3. If the syntax is wrong, you get the error and its position (line and column). Your data is never sent to a server.
Common JSON mistakes
  • A trailing comma: {"a": 1,} is not valid JSON.
  • Single quotes: strings and keys must use double quotes (").
  • Comments (//, /* */), undefined and NaN are not allowed in JSON.
  • Unquoted keys ({a: 1}) work in JavaScript but are not JSON.
FAQ

My large numbers change.

This tool uses the browser's JSON handling, so integers of 17 or more digits can lose precision. Wrap such numbers in strings.

Is key order preserved?

Formatting and minifying keep the input order. Integer-like keys such as "123" may move first because of JavaScript rules.

Is there a size limit?

There is no fixed limit, but tens of megabytes may slow the browser.

Results are for reference only and accuracy is not guaranteed. Keep a copy of important data. Terms & disclaimer