FREE TOOL · DEVELOPER

JSON Minifier

Compress JSON to a single line, right in your browser.

FREE · PRIVATE · NO UPLOAD
01 · THE MINIFIER

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.

RESULT
PASTE OR DROP JSON TO BEGIN
02 · HOW TO USE

Four steps, compact JSON.

No manual required — here's the entire flow.

STEP 01

Add your JSON

Paste your JSON into the box or drop in a .json file. It loads straight into the input area.

STEP 02

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.

STEP 03

Tap Minify

The tool parses your JSON, strips every unnecessary space, tab and line break, and produces a single compact line.

STEP 04

Copy or download

Copy the minified JSON or download it as a .json file. Compression stats show how much smaller your file got.

03 · WHAT YOU GET

Smaller JSON, same data.

The details that make compressing JSON faster and safer, without ever leaving your browser.

Runs on your device

No upload · No account · No watermark

Parsing, validating and minifying all happen locally in JavaScript. Your data never leaves your device.

Precise error detection

Line & column · Human-readable message

Invalid JSON gets pinpointed to the exact line and column, so you're not guessing where the syntax broke.

Compression stats

Original vs minified · Savings %

See exactly how many bytes you saved and what percentage smaller your JSON became after minifying.

04 · FAQ

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.