How to format JSON
- Paste your JSON into the input box.
- Press Format (or Ctrl + Enter) to indent it, or Minify to remove all whitespace.
- Copy the result or download it as a .json file.
Finding errors fast
When the JSON is not valid, the tool shows the line and column of the first problem. Click that link and the cursor jumps straight to it in the input box. The most common mistakes are:
- A comma after the last item of a list or object.
- Single quotes instead of double quotes.
- Keys without quotes, like {name: 1}.
- A missing closing bracket at the end of the file.
Format or minify?
Formatted JSON is for people: easy to read, review and diff. Minified JSON is for machines: the smallest size for network payloads, local storage or environment variables. Both contain exactly the same data.