Beautify and minify JSON.
The JSON formatter turns raw JSON into a clean, readable, indented layout (beautify) or strips every optional space and newline to make it as small as possible (minify). It first parses the text so it only ever outputs valid JSON.
Pretty-printing makes JSON easy to read and diff in code review; minifying shrinks payloads for APIs, config files and network transfer where whitespace is wasted bytes.
No. Both actions parse the JSON and re-serialise it, so values, types and key order are preserved — only indentation and spacing change.
Common causes are trailing commas, comments, single quotes instead of double quotes, or unquoted keys. Strict JSON allows none of those; the JSON validator will point to the exact position.
Two spaces is the most common convention for JSON and web config; four spaces or a tab can be easier to read for deeply nested data. It is purely cosmetic.