JSON Formatter
Validate, format, minify, and inspect structured JSON data.
Enter text to get started.
How to use JSON Formatter
- Paste or type your input. You can also load the example below.
- Adjust the available options. Results update after you finish typing; for very large inputs, select Run.
- Review the result, then copy it or download it to your device.
Input and output examples
Format a compact JSON object with two-space indentation
Input
{"name":"Avery","active":true}Output
{
"name": "Avery",
"active": true
}Minify JSON and sort object keys
Input
{
"z": 2,
"a": 1
}Output
{"a":1,"z":2}How this tool works
Uses standard JSON parsing. Duplicate keys keep their last value; numbers use JavaScript double precision. Keep integers larger than 9,007,199,254,740,991 in strings.
Input and output stay in the current page. Refreshing or closing the page clears them. For very large inputs, use Run to start processing; a task that takes too long is stopped so you can change the input.
Frequently asked questions
Why are comments, trailing commas, or single quotes rejected?
This tool parses standard JSON. Comments and trailing commas are not valid JSON, and object keys and string values require double quotes. Fix the reported error before formatting.
How can I produce minified JSON or sorted keys?
Choose Minified under Indentation to remove formatting whitespace. Enable Sort keys recursively to order object keys at every level; array order is preserved.
What happens to duplicate keys and large integers?
Standard JSON parsing keeps the last value of a repeated object key. Numbers use JavaScript double precision, so store integers larger than 9,007,199,254,740,991 as strings when exact digits matter.