Skip to content
Jellykit

JSON Formatter & Validator

Format, minify and validate JSON, with the exact line and column of any syntax error, optional sorted keys and numbers kept as written.

  • Runs on your device
Loading tool

About JSON Formatter & Validator

Paste JSON to pretty-print it with the indentation you prefer, squeeze it onto one line, or sort its keys so two documents can be compared. If the input is not valid, the error points to the line and column where parsing stopped.

Numbers are kept exactly as written, so long identifiers and high-precision decimals are not rounded on the way through.

How it works

  1. Your text is parsed with the browser’s own JSON parser, the same one that web pages and APIs use, so "valid here" means valid everywhere.
  2. The parsed document is written back out with your chosen indentation, or with none at all when you pick Minify.
  3. With Sort keys on, the properties of every object are reordered alphabetically at every depth. Arrays keep their order.

Questions

Is it safe to paste API responses or config files with secrets?

Yes. Parsing and formatting happen in this browser tab. The text is never sent anywhere and is gone when you close the page.

Why does it reject comments and trailing commas?

Those are not part of the JSON standard, although some editors and config formats tolerate them. Remove them, or the parser that eventually reads the file is likely to reject it too.

Will large numbers be changed?

No. In current browsers each number is copied from your input character for character, so a 20-digit id or a value like 1.10 comes out exactly as it went in. An older browser, or a document nested thousands of levels deep, cannot do that, and then a warning tells you how many numbers came out differently and where the first one is.

What happens when an object has the same key twice?

JSON parsers keep only the last value of a repeated key, so the earlier one is missing from the result. The document still counts as valid, but a warning gives the line and column of the repeat so you can fix it at the source.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.