JSON Formatter
Beautify, minify, and validate JSON instantly.
Input JSON
Result
About this tool
Paste any JSON to instantly format it with proper indentation, collapse it to a single minified line, or validate its structure. Everything runs in your browser - your data never leaves your machine.
How to use
- Paste or type your JSON into the input panel.
- Choose an indent size, then click Format to beautify or Minify to compact.
- Invalid JSON is highlighted with the line and reason so you can fix it fast.
- Copy the result or download it as a .json file.
Examples
Minified input
{"name":"Ada","skills":["Java","SQL"],"active":true}Formatted output
{
"name": "Ada",
"skills": ["Java", "SQL"],
"active": true
}Frequently asked questions
No. All formatting and validation happen locally in your browser using JavaScript. Nothing is transmitted or stored.
2 spaces, 4 spaces, or tabs. You can also minify to a single line.
Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments - none of which are valid JSON.