Search for a tool or command
Pretty-print JSON with configurable indentation and instant validation.
The JSON Formatter is a free online tool that turns compact, minified, or hand-edited JSON into clean, properly indented output that is easy to read and review. It doubles as a JSON validator: paste or upload a file, pick your indentation style, and it pretty-prints valid JSON while pinpointing the exact line and column of any syntax error. Copy the result, download it as a .json file, and keep working offline. Everything is parsed and rendered locally in your browser, so even large or confidential payloads never leave your machine.
Drop raw, minified, or messy JSON into the input editor. It can be a single object, an array, or any valid JSON value.
Select 2 spaces, 4 spaces, or tabs to match your project's style guide.
The tool pretty-prints the document instantly and flags any syntax errors with their location.
Copy the clean output to your clipboard or download it as a .json file.
A compact object expanded to two-space indentation.
Input
{"id":42,"name":"Ada Lovelace","roles":["admin","author"],"active":true}Output
{
"id": 42,
"name": "Ada Lovelace",
"roles": [
"admin",
"author"
],
"active": true
}Validate JSON syntax and pinpoint the exact line and column of any error.
Strip whitespace to shrink JSON to the smallest valid payload.
Turn minified or tangled JSON into clean, readable, well-indented text.
Explore JSON as a collapsible, interactive tree.
Recursively sort object keys alphabetically for stable, diffable JSON.