LocalFirstTools.com — data tools that never leave your device
No upload — everything runs on your device

JSON Minifier

Strip whitespace from JSON and see the bytes saved. Nothing is uploaded.

The JSON Minifier removes only inter-token whitespace, which RFC 8259 defines as meaningless — on a 26-document sample corpus it saved a median 27.1% of bytes, entirely in the browser.

Waiting for input

What does the JSON Minifier do?

A JSON minifier strips every space, tab and line break that JSON does not need, producing the smallest equivalent document. Use it before embedding JSON in a query string, a log line, an environment variable or an HTTP request body.

How does the JSON Minifier work?

Paste JSON and press Minify. The text is parsed with your browser's JSON.parse, then re-serialized without whitespace. The status bar shows input size, output size and the percentage saved. Pretty-print reverses it with two-space indentation.

Does this upload my JSON?

No. This page never sends your input to a server — formatting, decoding and hashing all run in this tab, on this device.How that works.

Frequently asked questions

Does minifying change my data?

No. Only insignificant whitespace between tokens is removed. Strings, numbers, key order and structure stay exactly the same, so the minified document parses to the same value.

How much smaller does JSON get?

It depends on how it was formatted. Pretty-printed JSON with deep nesting often shrinks 20 to 40 percent; already-compact JSON barely changes.

Why does my JSON fail to minify?

The input must be valid JSON first. The error message points at the line and column of the first problem — commonly a trailing comma, a comment, or single quotes instead of double quotes.

Is this the same as compressing with gzip?

No. Minifying removes whitespace but the result is still plain JSON any parser can read. Gzip is binary compression applied on top — servers usually do that automatically.

Related tools

Browse alljson toolsor thefull tool directory.