JSON formatter & beautifier
Beautify messy JSON into readable, indented text, minify it down for production, or sort keys alphabetically at every depth. Choose 2-space, 4-space, or tab indentation, and keep short primitive arrays compact instead of exploded one-per-line.
More control than a plain pretty-printer
JSON.stringify's built-in indent option is all-or-nothing. This formatter adds the controls real projects actually need.
JSON.stringify can't produce.Frequently asked questions
What is the difference between beautify and minify?
Beautify adds indentation and line breaks so JSON is easy to read. Minify removes all unnecessary whitespace to produce the smallest possible payload, which is useful for APIs and file size.
What does "Compact arrays" do?
When enabled, arrays that contain only primitive values (numbers, strings, or booleans) are kept on a single line instead of one item per line, while objects and nested arrays are still expanded. This keeps short lists like coordinates or tags compact and readable.
Does Sort Keys change the order of array items?
No. Sort Keys only reorders object property names alphabetically at every nesting level. Array item order is always preserved.
Can I use a tab character for indentation?
Yes. The indent selector supports 2 spaces, 4 spaces, or a single tab character, applied consistently across every nested level.