Skip to main content
KalkuNet

JSON Minifier — Compress JSON to One Line and Measure the Byte Savings

Strip whitespace and newlines from JSON payloads and compare byte savings.

Runs in your browserDeveloper · JSON, YAML, TOML, XML & CSV Converters
  • integer at $.requestId exceeds 2^53 (12345678901234567890): JavaScript JSON.parse rounds it

UTF-8 size: 340 B → 340 B (−0%)

When to use the JSON Minifier & Whitespace Compressor

  • Only whitespace is removed

    Spaces, tabs and newlines outside strings are removed. String contents, key order and number spelling stay exactly the same, so the result means the same as the source.

  • Measured savings

    The UTF-8 size before and after is shown with the percentage. Neatly indented JSON often shrinks by 20 to 40 percent before gzip or Brotli compression.

  • For payloads and environment variables

    One-line JSON fits curl request bodies, environment variables, headers or database columns that do not accept newlines.

  • Big numbers stay safe

    Integers above 2^53, such as 19-digit IDs, are not rounded because numbers are copied as text; a warning tells you that JavaScript would round them.

Frequently asked questions

Does the key order change?

No. Keys stay in their original order; to sort them, use the JSON Formatter and then minify the result.

What if my JSON is invalid?

No result is produced, and the line and column of the error are shown, so broken JSON is never shipped silently as one line.

Can the result be pretty printed again?

Yes. Paste it into the JSON Formatter; because no data was changed, re-formatting gives the same tidy version back.

Is my data uploaded?

No. Everything runs in your browser.

Are escapes such as \u00e9 kept?

Yes. Strings are copied exactly as in the source, including \u and \/ escapes, so signatures or hashes computed over the original text are not broken by re-encoded characters.

Learn more