JSON Formatter
- Auto-repair
- Sort keys
- Nothing uploaded
Beautify JSON, and repair the mistakes that normally stop it parsing at all.
Paste input on the left to see formatted.
Everything runs in your browser — nothing is uploaded.
About formatter
A JSON formatter re-indents JSON so it is readable. JSONic lets you choose 2, 4, or 8 spaces, optionally sort keys for stable diffs, and auto-repair the mistakes that usually block parsing altogether: trailing commas, single-quoted strings, unquoted property names, and JavaScript comments.
Paste messy JSON and get readable, correctly indented output. Choose your indent width, sort keys alphabetically for stable diffs, and let auto-repair fix the mistakes that normally break a parse: trailing commas, single-quoted strings, unquoted property names and JavaScript comments. Repair runs a real tokenizer rather than regular expressions, so it never rewrites content inside string values.
Questions
What exactly does auto-repair fix?
Trailing commas before a closing bracket, single-quoted strings, unquoted object keys, and // or /* */ comments. It tokenizes the input, so a comma or brace inside a string value is left alone — which is where naive regex-based fixers corrupt data.
Why would I sort keys?
Sorted keys make two exports of the same data diff cleanly, which is what you want before committing fixtures or comparing API responses across environments.
Does formatting change my data?
Formatting only changes whitespace. Sorting keys reorders object members, which JSON treats as unordered, so the data remains equivalent — though a consumer that wrongly depends on key order would notice.