JSON Minifier
Strip whitespace to compress JSON to its smallest size.
Processed locally in your browser. Nothing you enter is uploaded or stored.
- Parses first, so invalid JSON is caught rather than silently mangled.
- Smallest valid output — every space and newline outside strings removed.
- Runs in your browser; nothing you paste is uploaded.
Why this is private
- Processed locally in your browser. Nothing you enter is uploaded or stored.
- Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
- Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.
Overview
Removes all unnecessary whitespace from JSON, producing the smallest possible payload — useful before storing JSON in a database column or sending it over the wire.
How to use it
- 1Paste formatted or messy JSON.
- 2The minified output appears immediately.
- 3Copy it or download as .json.
Examples
Formatted to minified
Input
{ "id": 1, "active": true }
Output
{"id":1,"active":true}
Frequently asked questions
What people use it for
Shrink a config or payload before storing itFit JSON into a database column or cache entry without the indentation overhead.
Put JSON in a URL or headerMinify before encoding so the query string or header value stays short.
Reduce API response sizeStrip whitespace from a static JSON file served to clients.
Paste JSON into a single-line contextA log field, a shell command or a CSV cell that can't hold newlines.
Related guides
- How to format JSON (and actually understand the errors)JSON looks like a JavaScript object but follows stricter rules. Here's what those rules are and how to read the errors when they're broken.
- JSON parse errors explained: 'Unexpected token', 'Expected comma or brace', and the restWhat each common JSON error message actually means, the usual cause, and how to find the spot fast using line and column.
- How to read JSON with a tree viewerA tree viewer turns a wall of brackets into a structure you can expand, search and copy paths from. Here's how to use one effectively.
Related tools
All developer toolsJSON Viewer & FormatterView, format, validate, edit and beautify JSON with an interactive tree view, plus a shareable link.JSON ValidatorValidate JSON syntax and pinpoint errors instantly.JSON DiffCompare two JSON documents and highlight the differences.JWT DecoderDecode JWT headers and payloads, and verify HMAC signatures with a secret.
Ready to use JSON Minifier?
JSON Minifier