Data & Code

JSON Minifier

Validate and minify JSON without changing its data.

Read the guide

Run the tool

The calculation runs in your browser. This tool does not send your input to JVR Software.

More information

Back to the tool

What it is and when to use it

JSON Minifier removes formatting whitespace from valid JSON to produce compact text. Use it when a configuration field expects one line, when comparing compact payloads, or when preparing a small example for documentation. It does not gzip the document or convert it into a different data format.

How it works

The tool validates JSON and removes whitespace between its syntax tokens. It preserves escaped content and the characters inside strings. An escaped line break inside a string is part of that string's value and is different from an actual newline used to indent the document.

How to use it

  1. Paste a JSON value or complete document.
  2. Run the minifier and inspect the single-line result before copying it.
  3. Reformat the same result later with JSON Validator & Formatter if you need to review it.

Worked example

Paste a multiline object containing the value "Cape Town". The spacing around braces and colons disappears, while the space between Cape and Town remains because it belongs to the value.

Reading the result

The compact length is typically smaller only when the original document used formatting whitespace. Already compact input can look unchanged. Minification is not cryptographic canonicalisation, so other tools may produce different byte sequences from equivalent data.

Check required byte-for-byte references before replacing a formatted document with a compact one. An API can parse both representations identically while a file checksum changes. If the service signs a payload, use the exact serialization required by its specification.

Common mistakes and limits

Do not paste several independent newline-delimited JSON records as one input. That format contains multiple documents and is not a single JSON value. Keep an original copy when whitespace or signatures matter, and handle confidential payloads under your own data policy.