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.

A JSON formatter pretty-prints, minifies and validates JSON. Paste a payload in the box above, pick an action, and you get it back indented and readable, compacted for transport, or flagged with the line and column where the parse broke.

Everything runs in your browser. Your JSON is never uploaded, logged or stored, which is the part I care about most, because half the payloads anyone formats carry a customer email, an access token or a production record. Formatting touches one thing: whitespace. RFC 8259 calls that spacing insignificant, so the values stay byte-identical and only the layout changes.

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

What the tool does

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

Minify: strips every insignificant space and newline into one dense line for storage or transport.

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

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

Pretty-print or minify

The same transform set covers CSS and HTML, which matters if your payload has a stylesheet or a markup blob stuffed into a string field. Klipto classifies JSON, HTML, CSS and plain code separately, so the actions offered match what you actually copied.

Detection runs on copy, before you paste. There is no format menu to open and no language to pick, and the paste itself carries the formatted text.

Both give you the same data, and they differ in who reads the output. Pretty-print is for people. Minify is for machines and for byte counts.

The size win from minifying is real and smaller than most tools claim. Stripping whitespace trims a typical file by 20-40%, more when it was indented with four spaces. Turn on gzip or brotli at the HTTP layer and most of that saving disappears, because compression already collapses repeated whitespace. Minifying first still ends up marginally smaller. It is rarely worth chasing on its own.

Minify a payload heading into a database column, a URL or a request body nobody reads. Pretty-print everything a human will look at, including anything you are about to commit.

Common JSON errors

JSON is stricter than JavaScript, and four constructs that JS accepts are illegal under RFC 8259. They cause most "invalid JSON" messages.

Trailing commas are the single most frequent error. A comma before } or ] has nothing after it to separate, so delete it.

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 /* */ on purpose, so strip them before parsing.

Number and encoding rules catch people out. 0123 is not a valid JSON number, NaN and Infinity are not permitted even though Python's json module will emit them, and the spec says implementations must not add a leading byte order mark (U+FEFF).

Duplicate keys matter more than they look. Python and JavaScript JSON.parse keep the last value, while strict parsers reject the document outright. That disagreement is a known interoperability problem: a payload that validates in one service can be read differently by the next one downstream. Extract keys finds it in a second.

Using it

1. Paste JSON into the box above.

2. Pick pretty-print, minify, validate or extract keys. Set the indent if you are pretty-printing.

3. Copy the result. Nothing left your browser at any point.

This free tool vs Klipto

This free web toolKlipto
Pretty-print, minify, validateYes, one snippet at a timeYes, on the paste
Extract keysYesYes
Detects JSON when you copy itNo, you paste it inYes
Where the formatting happensIn this pageIn the paste preview, on ⌘V
Works in an editor, Slack, a terminal, an API clientThis page onlyAnywhere you paste
Needs a browser tabYesNo
Clipboard history, Stack, other transformsNoYes
PlatformAny browsermacOS 14+
PriceFreeFree tier, $19.99 one-time

Plenty of Mac developers already skip the website with pbpaste | jq '.' | pbcopy on a hotkey. That works, and it proves the transform belongs on the clipboard rather than on a page. It also needs a terminal, an installed binary, and it does exactly one thing.

You can get it automatically on every paste with Klipto instead. It detects JSON as you copy, offers pretty-print, minify and extract keys in the paste preview, and applies your pick on ⌘V, offline, in whatever app you are pasting into.

Frequently asked questions

What is a JSON formatter?

A JSON formatter reformats JSON text. It pretty-prints with indentation, minifies to one compact line, or validates the input and reports where it breaks. The data is unchanged, and only whitespace and layout differ.

What is JSON pretty print?

Pretty print, also called beautify, adds indentation and line breaks so nested objects and arrays read cleanly. Each level is offset by 2 spaces, 4 spaces or a tab. It is the format you want for debugging, review and readable Git diffs.

What is the difference between beautify and minify?

Beautify adds whitespace for people to read. Minify removes it so machines get fewer bytes. Same data either way under RFC 8259, so beautify to debug and minify to store or send.

How do I validate JSON and find the error?

Paste it and run Validate. The parser checks the input against the spec and reports the first failure with a line and column number. Usual causes are a trailing comma, single quotes or an unquoted key.

Does formatting change my data?

No. Pretty-printing and minifying alter insignificant whitespace only. RFC 8259 permits spacing around the structural characters, so the values that come out are byte-identical to the ones that went in.

Is my JSON uploaded anywhere?

No. The formatter runs entirely in your browser, so your JSON is not uploaded, logged or stored on any server. That also means the page keeps working offline once it has loaded.

Do I need to install anything?

Not for this page. It is free, needs no account, and works as soon as it loads. Klipto is the separate Mac app, with a permanent free tier and a one-time $19.99 licence.

How do I format JSON from my clipboard on a Mac?

Pipe it through the terminal with `pbpaste | jq '.' | pbcopy`, which needs `jq` installed. Without a terminal, Klipto detects JSON on copy and applies pretty-print, minify or extract keys on ⌘V in any app.

How do I extract just the keys from JSON?

Run Extract keys. It walks the object and returns a flat list, which shows the shape of a payload at once and reveals duplicate keys buried in a long response.

Get Klipto for Mac

Free for 14 days · no card, no account required · 5 MB

Download Klipto