Relaxed mode tolerates trailing commas, single quotes, unquoted keys and comments — handy for pasting config files.
Relaxed mode tolerates trailing commas, single quotes, unquoted keys and comments — handy for pasting config files.
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".
Two-space, four-space or tab indentation, or strip it all out and see how much smaller it got.
Parse failures name the line and column and quote the offending line, instead of "Unexpected token".
Optionally accept comments, trailing commas, single quotes and unquoted keys — real config files, in other words.
Order keys for comparison, escape JSON into a string literal, or pull one back out.
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.
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.
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.