JSON Formatter and Validator

Pretty print, minify or check JSON, and see exactly where it breaks. Your data stays on your device.

  • Runs in your browser
  • No sign-up
  • No watermark

Paste JSON to make it readable, shrink it to one line, or check that it is valid. When something is wrong, the tool shows the line and column and explains the problem in plain words, such as a trailing comma, single quotes or a missing bracket, with the line printed under a caret.

Numbers and text are copied exactly as you wrote them, so a long ID like 12345678901234567890 is not rounded. The work happens in your browser and nothing is uploaded.

How to use JSON Formatter

  1. Paste your JSON, or choose or drop a .json file.
  2. Pick Format, Minify or Validate.
  3. Choose the indent, and tick Sort keys if you want them in order.
  4. Copy the result or download it.

Frequently asked questions

Is my JSON uploaded?

No. It is checked and formatted in your browser and never leaves your device.

What does Validate do?

It only checks the JSON. If it is valid, you see a short summary such as an object with 12 keys. If not, you see the line, column and reason.

Does it change my numbers?

No. Numbers and strings are kept exactly as written, so large integers and numbers like 1.50 are not rounded or reformatted.

What kinds of mistakes can it explain?

Trailing commas, single quotes, unquoted keys, comments, missing commas or colons, unclosed strings, raw line breaks in strings, bad escapes, numbers like 01, and values such as NaN or undefined that JSON does not allow.

Does it fix broken JSON for me?

No. It tells you where the problem is and what it is, and you correct it. It does not guess what you meant.

How does Sort keys work?

Keys are sorted alphabetically at every level of nesting. The order of items inside lists is never changed.

Is there a size limit?

No fixed limit, but very large files depend on your device memory. The box shows the first part of a huge result, and Copy and Download include all of it.