About the JSON formatter
A JSON formatter is the tool you reach for when an API hands you 40KB on one line. This one beautifies it with 2-space, 4-space or tab indentation, minifies it back down when you need it small, sorts keys so two payloads can be compared, and escapes or unescapes JSON that has been embedded inside another string. If the document will not parse, it tells you the line and column and quotes the offending line, instead of the usual "Unexpected token".
How to use it
- Paste, drop or upload your JSON on the left.
- Pick a mode — beautify, minify, escape or unescape — and an indent width.
- Copy the result, or download it as a .json file.
Questions
Is my JSON uploaded to a server?
No. The formatter is JavaScript running in your own tab; the payload never leaves your machine. You can check in DevTools — the network tab stays silent while you work.
Can it handle JSON with comments or trailing commas?
Yes — tick "Accept JSON5-ish input". It tolerates comments, trailing commas, single-quoted strings and unquoted keys, which is what most config files and hand-edited payloads actually look like, and converts them to strict JSON.
How large a file can it format?
Large ones. Since there is no upload step, the limit is your browser's memory rather than a server request size — multi-megabyte payloads format in place.