Paste JSON, strip the whitespace, go.
Drop in a .json file or paste raw JSON, choose your options, then minify. The tool validates as it goes — nothing is uploaded, everything runs on your device.
Drop a .json file here or tap to browse
Or paste your JSON directly below
Auto-fix strips comments and trailing commas and quotes bare keys. Unescape unwraps JSON that's been copied as an escaped string, e.g. "{\"a\":1}".
Sort keys reorders every object's keys alphabetically before minifying. Escape wraps the minified JSON as a quoted string, ready to embed in code.
Minified output is one long line — turn on word wrap if you want it to stay visible without horizontal scrolling.
Four steps, compact JSON.
No manual required — here's the entire flow.
Add your JSON
Paste your JSON into the box or drop in a .json file. It loads straight into the input area.
Set your options
Turn on Auto-fix if your JSON has comments or trailing commas, and Sort keys A→Z if you want alphabetical keys before minifying.
Tap Minify
The tool parses your JSON, strips every unnecessary space, tab and line break, and produces a single compact line.
Copy or download
Copy the minified JSON or download it as a .json file. Compression stats show how much smaller your file got.
Smaller JSON, same data.
The details that make compressing JSON faster and safer, without ever leaving your browser.
Runs on your device
Parsing, validating and minifying all happen locally in JavaScript. Your data never leaves your device.
Precise error detection
Invalid JSON gets pinpointed to the exact line and column, so you're not guessing where the syntax broke.
Compression stats
See exactly how many bytes you saved and what percentage smaller your JSON became after minifying.
Questions people actually ask.
The short answers — with the long ones one tap away.
What does a JSON minifier do?+
A JSON minifier removes all unnecessary whitespace — spaces, tabs, and line breaks — from a JSON document while keeping the data exactly the same. The result is a single compact line that's smaller and faster to send over a network.
Is my JSON uploaded to a server?+
No. Minifying, validating and sorting all happen locally in your browser using JavaScript. Your data never leaves your device, so it's safe to use with private or sensitive JSON.
How much smaller will my JSON get?+
It depends on how much whitespace and indentation your original file has. Pretty-printed JSON often shrinks by 30–70%. The tool shows a live compression stat comparing the original and minified sizes.
Can I minify invalid JSON?+
No — minification requires valid JSON. If your JSON can't be parsed, the tool reports the exact line and column where the error starts so you can fix it. You can also turn on Auto-fix common errors to clean up comments, trailing commas, and unquoted keys first.
Can I sort the keys while minifying?+
Yes. Turn on Sort keys A→Z before minifying, and every object's keys are reordered alphabetically at every level. This doesn't change the data, only the key order.
Does minifying change my data?+
No. Minification only removes whitespace between tokens. String values, numbers, booleans and null stay exactly the same. The parsed data is identical before and after.
Is this JSON minifier free to use?+
Yes, it's completely free with no account, no sign-up, and no limit on how many times you use it.