JSON Formatter & Validator

Paste JSON to check that it is valid, make it easy to read, or shrink it into one line. If the JSON is broken, the tool points to the line and column where parsing failed.

How to use it

  1. Paste or type your JSON in the input box.
  2. Choose an indent size, and tick "Sort keys" if you want keys in alphabetical order.
  3. Press Format to pretty-print it, or Minify to remove all extra spaces.
  4. Copy the result with the Copy button.

Limitations

Frequently asked questions

Is my JSON uploaded to a server?

No. Parsing and formatting happen in your browser tab.

Why does it say my JSON is invalid?

Common causes are single quotes, trailing commas, unquoted keys and missing brackets. The error message shows the position.

What does "Sort keys" do?

It sorts object keys alphabetically at every level. Array order is never changed.

Related tools