JSON Formatter by Klipto

Pretty-print, validate and minify JSON. Free, in your browser, or prettify JSON on every paste with Klipto on your Mac.

Paste JSON to format.

100% in your browser. Nothing is uploaded, logged, or stored.

Paste a payload, pick an action, and you get it back indented, compacted, or flagged with the line and column where the parse broke. Formatting touches one thing: whitespace. RFC 8259 calls that spacing insignificant, so values stay byte-identical and only the layout changes.

Nothing is uploaded, which matters more here than on most pages. Half the payloads anyone formats carry a customer email, an access token or a production record.

Meet Klipto

Format JSON where you paste, not in a browser tab.

Klipto is a native macOS clipboard manager. Copy any JSON and its preview panel offers pretty-print and minify, right where you paste, offline, and it never leaves your Mac.

See what Klipto does

The four actions

Pretty-print reindents with 2 spaces, 4 spaces or tabs, so nested objects and arrays line up. This is the one for debugging, reviewing a diff, or reading someone else's API response.

Minify strips insignificant space and newlines into one dense line.

Validate parses the input and, on failure, reports the line and column. You go to the character that broke it instead of reading the whole file.

Extract keys returns a flat list of object keys. Fastest way to see the shape of a large response, and it surfaces a duplicate key that indentation hides.

The size win from minifying is real and smaller than most tools claim. Stripping whitespace trims a typical file by 20 to 40%. Turn on gzip or brotli at the HTTP layer and most of that saving disappears, because compression already collapses repeated whitespace.

Four things JavaScript allows and JSON does not

These cause most "invalid JSON" messages.

Trailing commas are the most frequent by a wide margin. A comma before } or ] has nothing after it to separate.

Single quotes, backticks and unquoted keys all fail. Strings and keys need double quotes, so {name:1} has to become {"name":1}.

Comments are not in the grammar. Douglas Crockford removed // and /* */ deliberately, so strip them before parsing.

Number and encoding rules catch people out. 0123 is not a valid JSON number, and NaN and Infinity are not permitted even though Python's json module emits them.

Duplicate keys deserve their own warning. Python and JavaScript JSON.parse keep the last value, while strict parsers reject the document outright, so a payload that validates in one service can be read differently by the next one downstream.

On a Mac, Klipto detects JSON at copy time and offers pretty-print, minify and key extraction in the paste preview, with no format menu to open.

Frequently asked questions

How do I find the error in invalid JSON?

Validate and read the line and column it reports, then check that character and the one before it. A trailing comma or a curly quote accounts for most failures.

Does formatting change my data?

No. Only whitespace between tokens changes. Keys, values, numbers and string contents come back identical.

What is the difference between beautify and minify?

The audience. Beautify, or pretty-print, adds indentation for people. Minify removes it for machines and byte counts. The data is the same either way.

Stop re-copying. Download Klipto for Mac.

Local · no card, no account · macOS 14+ · 7.5 MB