How to use JSON Formatter
- Paste your JSON into the input box (or click Load sample).
- Click Format to pretty print it, Minify to compress it, or Validate to just check it.
- Copy the result or download it as a .json file. Fix any error at the line and column shown.
About this tool
API responses and log files often arrive as one long line of JSON that is impossible to read. Paste it into this JSON formatter and it is pretty printed with clear indentation in an instant – choose 2 spaces, 4 spaces or tabs. Click Minify to do the reverse and strip every unnecessary space before sending JSON over the network.
It is a JSON beautifier and a JSON validator in one: it checks the syntax as it works. If the JSON is broken – a missing comma, a trailing comma, single quotes or an unclosed bracket – you get the error message with its line and column, and the cursor jumps to the problem. Optional key sorting puts every object's keys in A–Z order, which makes two JSON documents much easier to compare. A summary shows the size, number of keys and nesting depth. Your data is processed in your browser and never uploaded.