JSON Formatter

Brace · Format JSON, find the typo.

Made on your device · nothing uploaded
Indent

Large numbers are kept exactly as written.

Paste JSON to check and format it.

Checked on your device. Your JSON is not sent or saved.

How to format and validate JSON

  1. Paste JSON into the box or open a .json file.
  2. If there's an error, read the line, column and plain explanation, then jump straight to it.
  3. Pick 2 spaces, 4 spaces, tabs or minify, and sort keys A–Z if you like.
  4. Copy the result or download it as a .json file.

When it helps

API responses
Turn a one-line API response into readable, indented JSON and browse it as a tree.
Config files
Find the missing comma or stray quote that breaks a package.json or settings file.
Smaller payloads
Minify JSON before sending it or embedding it in a page.

Questions

Why is my JSON invalid?

Common causes are a missing comma between items, a trailing comma before ] or }, single quotes instead of double quotes, and keys without quotes. The error message names the exact one.

Will big numbers lose precision?

No. Numbers are kept exactly as written, so an ID like 9007199254740993 isn't rounded the way it is in many formatters.

Does it warn about duplicate keys?

Yes. JSON allows duplicate keys but most programs keep only the last one, so duplicates are listed under the result.

Does it support comments or JSON5?

No. It checks strict JSON as defined in RFC 8259, the format APIs and most tools expect. Comments are reported as errors.

Is my JSON uploaded?

No. Parsing and formatting run in your browser, so tokens and private data in your JSON stay on your device.

Privacy

Your JSON is checked and formatted in your browser. Nothing is uploaded or stored.

Limitations

  • The tree view shows the first 2,000 values. The text view always shows everything.
  • Very large files (tens of MB) may be slow on older phones.

Try these too

Use ↑ ↓ to move, Enter to open, Esc to close.