Prettify a minified API response
{"user":{"id":1,"name":"Alice","roles":["admin","editor"]}}{
"user": {
"id": 1,
"name": "Alice",
"roles": [
"admin",
"editor"
]
}
}Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
Format, validate and minify JSON
Loading interactive tool…
JSON Formatter is a browser-based tool that prettifies, minifies, and validates JSON without sending it to a server. Paste JSON from an API response, config file, or log dump; formatting uses fixed two-space indentation, minification produces a compact string, and parse errors are shown in the result area. Processing uses the browser's native JSON engine, so the input stays in the browser tab.
Formats valid JSON with consistent two-space indentation.
Minifies valid JSON to a compact single-line string.
Reports native parser errors when the input is invalid.
Runs in the browser using the native JSON engine.
Copies the formatted or minified result with one click.
{"user":{"id":1,"name":"Alice","roles":["admin","editor"]}}{
"user": {
"id": 1,
"name": "Alice",
"roles": [
"admin",
"editor"
]
}
}{"host":"localhost","port":5432,}Error on line 1, col 31: Unexpected token } — trailing comma after last property is not valid JSON.{
"debug": false,
"timeout": 30,
"retries": 3
}{"debug":false,"timeout":30,"retries":3}