How to format JSON
Minified or messy JSON is hard to read and debug. Here's how to beautify it and catch errors at the same time.
Steps
- Open the JSON formatter and paste your JSON.
- Choose an indentation (2 or 4 spaces, or tabs).
- Valid JSON is beautified instantly; invalid JSON shows a clear error.
- Copy the formatted result.
Formatting also validates
If the formatter can't parse your input, it means the JSON is invalid — a trailing comma, a missing quote or bracket. The error message points you at the problem so you can fix it before shipping.
Tools used in this guide
Related guides
How to format JSON — FAQ
Paste it into the JSON formatter and pick an indentation — it beautifies the JSON with consistent spacing.