JSON

JSON Minifier

Strip every space, newline, and indent from JSON — the smallest valid form of your document.

Minification runs locally in your browser. Nothing is uploaded, logged, or stored.

0 chars
1
Paste pretty-printed JSON here...
0 chars
Result appears here

How to use

  1. Paste pretty-printed JSON into the input panel.
  2. Click Minify — all insignificant whitespace is removed.
  3. Compare the character counts at the top of each panel to see how much you saved.
  4. Copy or download the minified result.

Why minify JSON?

Indentation and line breaks make JSON readable for humans, but parsers ignore them completely. Removing that whitespace can shrink a document by 20–40%, which matters when the JSON lives in a size-limited context: an environment variable, a URL parameter, a serverless config, or a payload you pay to transfer.

The minifier parses first and re-serializes, so it also acts as a validation gate — broken JSON is reported with the parser error instead of being silently mangled. To go back to the readable form, use the JSON Formatter; if you need a quoted string form instead, use the JSON Stringify tool.

Examples

Fit a payload into an env var

Collapse a service-account JSON before storing it in a single-line CI environment variable.

Smaller API stubs

Minify fixture files committed to a repository to keep diffs small and files compact.

Frequently Asked Questions

Is my data uploaded anywhere?+
No. Minification runs entirely in your browser with the native JSON parser.
Is minified JSON still valid?+
Yes. Whitespace outside string values is insignificant in JSON, so the minified output parses to exactly the same data.
Are spaces inside strings removed too?+
No. Whitespace inside string values is data and is always preserved. Only structural whitespace between tokens is removed.
What if the input is invalid?+
The parser error is shown and nothing is output, so you never get silently corrupted data. Repair the input with the JSON Formatter & Validator first.

Related Tools

Looking for something else? Browse all tools