JSON minifier

Production APIs and log shippers often send compact JSON without pretty whitespace. Minifying removes indentation and line breaks while preserving data — shrinking bytes for bandwidth and storage. Validate first, minify second, all in-browser.

How to minify JSON

1. Paste pretty-printed JSON.
2. Click minify — invalid JSON shows parse error.
3. Copy single-line result.
4. Use in HTTP body, env vars, or embedded config.

Minify examples

Embed in HTML data attribute

Shrink chart config JSON to fit inline script tag with fewer bytes.

Lambda env size

AWS env vars have size limits — minify nested JSON secrets wrapper.

Mobile API request

Reduce POST body size on slow networks — every KB counts on 3G.

When to minify JSON

• When shipping JSON over wire repeatedly at scale.
• When storing many similar config blobs.
• When tools require single-line JSON (some CLIs).

Canonical JSON for signing

JWT and some blockchain APIs require canonical byte order. Blind minify after sorting keys may be required — check spec before minifying signed payloads.

Frequently asked questions

Does minify change data?

No — only insignificant whitespace is removed; values and key order stay the same (key order preserved as parsed).

Minify vs compress?

Minify removes spaces; gzip compresses further at HTTP layer — both stack.

Invalid JSON?

Minifier fails parse — fix with validator first.

Unicode escaped?

Standard stringify may escape non-ASCII — behavior matches JSON.stringify.

Local?

Yes.