Skip to content
en es

JSON Formatter & Validator

Paste JSON to pretty-print it, minify it or find out exactly where it is broken. Sort the keys, or browse the document as a collapsible tree.

Runs in your browser — nothing is uploaded.

Result Tree
Copied

The tree shows the first 5,000 items only.

How to use it

  1. Paste your JSON on the left and press Format, Minify or Validate.
  2. If the JSON is not valid, the message gives the line and column of the first problem.
  3. Pick the indentation and tick “Sort keys” if you want a stable order. Use Tree to expand and collapse parts of the document.
  4. Copy the result or download it as a .json file.

Frequently asked questions

Is my JSON uploaded?

No. Everything runs in your browser and nothing is sent anywhere. Very large documents are processed in a background worker so the page stays responsive.

Why is my JSON invalid?

The usual causes are a trailing comma, single quotes instead of double quotes, unquoted keys, comments, or a missing comma between items. The error message points to the first offending character.

Does sorting keys change the data?

Only the order of keys inside objects changes, at every depth. Arrays keep their order, and JSON objects are unordered by definition.

Are big numbers preserved?

Numbers are read as JavaScript numbers, so integers above 9007199254740991 lose precision, and a number such as 1.0 is written back as 1. If you need exact large integers, keep them as strings.

Are duplicate keys reported?

No. As in every JSON parser used by browsers, the last value wins and earlier ones are dropped.