Developer tool

JSON Formatter

Beautify, minify and validate JSON with error lines.

Free Runs in your browser

About this tool

JSON Formatter makes messy JSON readable with clean indentation, or squeezes it onto one line. It also validates the JSON and points to the line where an error is. Data stays in your browser.

How to use JSON Formatter

  1. Paste your JSON.
  2. Press “Format” or “Minify”.
  3. Fix any error shown, then copy.

Questions people ask

Why is my JSON invalid?

Common causes are trailing commas, single quotes instead of double quotes, and keys without quotes.

Is my data sent anywhere?

No. Parsing uses your browser’s built-in JSON engine.

Can I sort the keys?

Yes. Tick “Sort keys” to order object keys alphabetically.

Guides for JSON Formatter

More developer tools

See all 24 →
Esc