Paste JSON and switch between format, minify, and alphabetical key sort. Under the hood the page uses the browser JSON.parse / JSON.stringify pair with a 2-space indent. Do not paste live secrets.
Verified modes
Input {"z":1,"a":[3,1],"m":"한글"}:
| Mode |
Result |
| Format |
Keeps key order z→a→m, array [3,1], multi-line |
| Minify |
{"z":1,"a":[3,1],"m":"한글"} |
| Sort |
Keys a→m→z; array values stay [3,1] |
Sort walks nested objects but never reorders arrays, so event logs keep chronology while keys become diff-friendly.
Workflow
- Paste an API payload.
- Format to read structure.
- If parse fails, fix around the reported position (often the real bug is a trailing comma a few tokens earlier).
- Sort both sides before diffing configs.
- Minify only for transport or storage.
Limits
No JSON5, comments, or trailing commas. Integers outside the safe JS range should stay strings. Duplicate keys are undefined territory—do not emit them. Pair with the workbench when you also need CSV or YAML in the same session.
Why sort exists
Generated JSON often randomizes key order between environments. Diffing two pretty-printed payloads then looks like a full rewrite even when values match. Running sort on both sides collapses that noise. Nested objects are sorted at every depth; arrays keep order so chronological logs stay honest.
Use format while exploring. Use sort when comparing. Use minify when emitting to a size-sensitive channel. Do not minify as your only saved source of truth if humans must edit the file later.
Failure reading tips
Parser positions mark detection, not always the edit site. A missing closing brace reports at end-of-input. A trailing comma after the last array element usually points near the following token. Prefer fixing the grammar, then formatting—minifying invalid JSON never repairs it.
JavaScript object literal habits (single quotes, bare keys, comments) are the most common paste mistakes from the console. Convert those to strict JSON before expecting this tool to help.
Large integers, especially order IDs beyond Number.MAX_SAFE_INTEGER, should be quoted as strings before they ever reach JSON.parse in JavaScript. The formatter will not invent a bigint type for you.
After CSV→JSON, paste here to indent before code review. After YAML→JSON, sort both expected and actual payloads before diffing in CI discussions. Minify only at the edge that cares about bytes. The workbench hosts the same JSON engine if you need to hop to Base64 or hashing next without another tab.
Guardrails for teams
Adopt a simple house rule: fixtures committed to git are either sorted pretty JSON or documented YAML. Random key order in committed files creates review churn. Run sort before saving golden files. Keep minify for network captures and generated bundles, not for human-edited sources.
When an error message is opaque, copy only the failing substring into a minimal repro. Smaller inputs make the detection pointer easier to map to a missing comma or quote.