Paste JSON and format or minify it with one click; both input and output are editable.
How to format or minify JSON
Paste or type your JSON into the “Input” editor on the left. It has line numbers, syntax highlighting and bracket matching.
Click “Format” for readable JSON indented with 2 spaces, or “Minify” for a single line with all whitespace removed.
The result appears in the “Output” editor on the right and can be selected and copied. Both editors can be edited by hand.
If the JSON has a syntax error, the reason it failed to parse is shown at the top. Fix it and try again.
FAQ
Is my JSON uploaded?
No. Formatting and minifying run in your browser and the data is never sent to a server, so it is fine to use with API responses.
Can it check whether my JSON is valid?
Yes. Clicking “Format” or “Minify” first parses the text with standard JSON rules. If it is invalid, the browser’s error message is shown and no output is produced. Common causes are single quotes, property names without double quotes, a trailing comma, or comments.
What is the difference between Format and Minify?
Both change only whitespace, not the data. Format adds line breaks and 2-space indentation for readability. Minify removes all unnecessary spaces and line breaks, which suits smaller payloads or embedding in config.
Can formatting change key order or numbers?
The text is parsed and then written out again, so layout is normalized. Key order normally stays the same, but integers beyond JavaScript’s number precision may lose accuracy and duplicate keys keep only the last value, so keep that in mind.