Paste JSON to see it indented with two spaces, four spaces or tabs, or squeezed to a single line. If it is not valid, the message names the line and says what was unexpected. Keys can be sorted alphabetically to compare two files.
How to use the JSON Formatter tool
- Paste JSON or open a .json file in JSON Formatter.
- Choose the layout, and tick sorting if you want it.
- Copy or download the result in JSON Formatter.
Tips for the best result
- The usual causes of invalid JSON are a trailing comma and single quotes instead of double.
- Sort keys in two files before putting them through Text Compare.
Quick facts
| Price | Free |
|---|---|
| Works with | JSON |
| Where it runs | In your browser, on your device |
| Account | Not needed |