JSON Beautifier
Online JSON Viewer, JSON Beautifier and Formatter to beautify and tree view of JSON data.
Runs in your browser Your input never leaves your device.
About this tool
Paste minified or messy JSON and get it back indented and readable, with a choice of 2 or 4 spaces. Formatting happens in your browser using the standard JSON parser, so the data is never uploaded. Because the text is fully parsed first, the tool doubles as a quick syntax check: if the JSON is invalid you get the parser's error message instead of output. Formatting changes only whitespace — keys, values and their order stay the same.
How to use it
- Paste your JSON into the input box.
- Choose 2 or 4 spaces for the indent.
- Read the formatted result below, or fix the error message if the JSON is invalid.
- Copy the output.
Example
Minified input, 2-space indent:
{"name":"John","age":28,"tags":["a","b"]}{
"name": "John",
"age": 28,
"tags": [
"a",
"b"
]
}Common problems
- Trailing comma
- JSON does not allow a comma after the last item in an object or array. Remove it.
- Single quotes or unquoted keys
- Keys and strings must use double quotes. {name: 'x'} is JavaScript, not JSON.
- Comments in the JSON
- Standard JSON has no comments. Remove // and /* */ before formatting.
- Unexpected token at a position
- The error shows where parsing failed; look just before that position for a missing comma, quote or bracket.
Frequently asked questions
Does formatting change my data?
No. Only whitespace changes; keys, values and their order stay the same.
Is my JSON uploaded anywhere?
No. The formatting runs entirely in your browser.