My Tool Studio
Developer

JSON Minifier

Every space and newline in a pretty-printed payload costs bytes on the wire. When you minify json, a 12 KB formatted response often drops under 8 KB, and that saving is multiplied by every request your API serves. This tool does one job: paste formatted JSON, press Minify, and get the same data on a single line with a badge showing the percentage saved. It's json minify without a build step, a small dose of string compression for configs, fixtures, and request bodies. And because the input must parse before it can shrink, you'll never ship a payload the minifier silently broke.

Always freeNo sign upRuns in your browser
Output appears here...

How to use

01

Paste pretty-printed JSON

Drop the indented JSON into the input pane. Try sample loads a small formatted object if you want to watch the whitespace disappear first.

02

Click Minify

The tool parses your input and re-serializes it with zero spaces and line breaks. If parsing fails, you get the error instead of half-minified output.

03

Copy the single line

Grab the result with the Copy button. The green percentage badge tells you exactly how much smaller the payload became after minifying.

Why JSON Minifier

Common questions

How much does minifying JSON actually save?
It depends on nesting depth and indent width. Two-space indented JSON typically shrinks 15 to 35 percent; four-space or deeply nested documents save more. The badge above the output shows your real number. Combine it with gzip on the server and the whitespace cost disappears almost entirely.
What's the difference between minifying and json stringify online?
Minifying removes whitespace from a JSON document; stringifying escapes a document so it can live inside another string, quotes and all. If you were hunting for json stringify online or json to json string online, you want escaping, which is a different transformation. This page outputs valid JSON, not an escaped string.
Can I reverse it and get readable JSON back?
Minification only removes whitespace, so nothing is lost. Paste the compact line into the JSON Formatter, run a json beautify pass, and the indentation comes back. That formatter is also what people mean by a json beautifier online, so the two pages form a round trip.
Does this tool handle unminify js or unminify css jobs?
No, it's JSON only, and it compresses rather than expands. For unminify js there's the JS Beautifier, and for unminify css the CSS Beautifier; both restore readable formatting to compressed code. Keep this page for data payloads.
Do searches for minifiy json land in the right place?
That typo is common enough that yes, people arrive here from it regularly. The spelling doesn't change the job: strict parse in, single line out, percentage badge to prove the shrink.
Is a json formatter extension needed in my browser?
No. There's nothing to install and no permissions to grant; the page itself does the parsing locally. Extensions are convenient for auto-formatting API responses in tabs, but for shrinking a payload before you paste it somewhere, a plain page is enough.
Why did my input fail to minify?
The minifier validates before it compresses, so any syntax error stops it: trailing commas, single quotes, comments, or a stray character from a partial copy. You'll see the parse error with a position. Fix that spot and press Minify again.
Should I use a json converter when I need a different format instead?
Yes, minifying never changes format, only size. If the target is a spreadsheet or an XML consumer, a json converter online such as the JSON to CSV or JSON to XML pages does the translation. Minify afterwards only if the destination still speaks JSON.

More Developer tools

View all