Free JSON Formatter and Validator

Format, minify and validate JSON, with the exact line and column of any error.

Runs in your browser. Nothing you type is uploaded.

How to use the JSON Formatter

  1. Paste your JSON into the input box.

  2. Choose format or minify, the indent and whether to sort keys.

  3. Fix any error shown, then copy or download the result.

Questions

Why does my JSON fail with single quotes or a trailing comma?

The JSON standard only allows double quoted strings and does not allow a comma after the last item. JavaScript objects are more relaxed, so code that works in JavaScript can still be invalid JSON.

Does sorting keys change my data?

No. It only changes the order of keys inside objects. Array order is kept, and the values stay the same.

Is my JSON uploaded anywhere?

No. Parsing and formatting happen in your browser and nothing is sent or stored.

More developers tools

View all tools