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 tool | Klipto | |
|---|---|---|
| Pretty-print, minify, validate | Yes, one snippet at a time | Yes, on the paste |
| Extract keys | Yes | Yes |
| Detects JSON when you copy it | No, you paste it in | Yes |
| Where the formatting happens | In this page | In the paste preview, on ⌘V |
| Works in an editor, Slack, a terminal, an API client | This page only | Anywhere you paste |
| Needs a browser tab | Yes | No |
| Clipboard history, Stack, other transforms | No | Yes |
| Platform | Any browser | macOS 14+ |
| Price | Free | Free 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.