Format and pretty-print messy JSON online
Beautify and indent unformatted JSON strings into clean, human-readable structured trees.
Interactive Sample Data
| id | user | settings |
|---|---|---|
| 1 | Grace Kerubo | {"theme":"dark","notifications":true} |
| 2 | Peter Njoroge | {"theme":"light","notifications":false} |
How this tool works
Things that usually go wrong
- Trailing commas — JSON does not allow trailing commas after the last item. The formatter will flag the exact line.
- Unquoted keys — JavaScript object literals (e.g. {name: 'Alice'}) are not valid JSON. All keys must be quoted strings.
- Single quotes — JSON requires double quotes. The formatter highlights the offending token.
Edge cases we tested
Flags syntax position with precise line and character offset rather than crashing.
Repairs non-standard trailing commas before formatting.
Indents recursively without triggering call stack overflow exceptions.
Frequently Asked Questions
Does formatting change the data?
No. Only whitespace and indentation are changed. All values remain identical.
Can I format very large JSON files?
Yes. The formatter runs entirely in your browser and handles files up to several MB without sending any data to a server.
What indentation level is used?
2 spaces, which is the most common convention and produces the most readable output.
Related tools
JSON Minifier
Compress structured JSON files into single-line minified strings to reduce payload size.
Open Tool →Change CSV Delimiter
Switch spreadsheet delimiters between commas, semicolons, tabs, and pipes seamlessly.
Open Tool →Add a Header Row to CSV
Insert column headers to raw CSV files that lack a top header row.
Open Tool →