Cómo usar esta calculadora
What minification does — and what it does not touch
Minification removes every byte of whitespace between JSON tokens: the indentation, the line breaks, the padding after colons and commas that a formatter added. Whitespace outside string values is insignificant in JSON, so removing it changes nothing about the data — the same values, the same keys, the same order — while making the document as small as the format allows. The tool parses and re-serializes the document rather than editing text, so the output is guaranteed to be valid JSON and semantically identical to the input: the minifier cannot corrupt a document the way a text-based find-and-replace could.
That guarantee is the reason to prefer parse-and-stringify over a clever regex: number representation is preserved, key order is preserved, and the result is always a document the platform can parse again. The savings panel reports input bytes, output bytes, and the percentage saved, so the decision to ship the minified form is made on real numbers.
Where the bytes actually matter
Minification pays off wherever JSON crosses a boundary with a cost: an embedded config in a shipped product (the saving multiplies across every device and every fetch), a payload measured against an API quota, a stored blob billed by size, or a fixture committed to a repository where every byte stays in history. The worked example is typical: a 412-byte pretty-printed config minifies to 301 bytes — 27% smaller, with the same data.
The honest counter-case is also worth knowing: if the input is already compact, re-serialization can add a few bytes (re-escaping a character, for instance), and the tool reports a negative saving rather than hiding it. Minification is a formatting choice with measurable results, and the panel shows the true number in both directions.
The format that travels well
A minified document is still valid JSON, so it can be formatted back to readable indentation at any time — formatting and minifying are exact inverses for valid documents, which is why the JSON formatter and minifier are linked pages. The compact form is also the better base for a second, independent compression step: transport compression (gzip, brotli) works on the bytes after minification, and starting from the smallest valid form means the transport layer has less redundancy to remove.
The two caveats are worth keeping: minification removes whitespace only — it does not rename keys, strip comments (JSON has none), or compress values — and very large documents take a moment to process, so the tool is designed for typical configs and payloads rather than database dumps.
The local promise
Config files and payloads often contain tokens, internal endpoints, and other text that must not leak, and minifying is a job no service needs to see. Everything runs in your browser: the document is parsed and serialized locally, nothing is uploaded, logged, or stored, and copy and download actions deliver the result wherever it is needed.
Preguntas frecuentes
¿La minimización cambia mis datos?
No. El minificador analiza y vuelve a serializar el documento, lo que preserva exactamente los valores, el orden de las claves y la representación de los números. El espacio en blanco entre tokens es insignificante en JSON, así que eliminarlo no tiene pérdidas.
¿Por qué a veces mi salida minimizada es más grande?
Si la entrada ya es compacta, volver a serializarla puede añadir unos pocos bytes (por ejemplo, al volver a escapar caracteres). El porcentaje de ahorro puede ser negativo en esas entradas: la herramienta informa de las cifras reales en lugar de ocultarlas.
¿El JSON minimizado se puede volver a formatear?
Sí: la forma minimizada es JSON válido, así que el formateador de JSON restaura la sangría legible en cualquier momento. Formatear y minimizar son operaciones inversas exactas para documentos válidos.
Does the minifier remove comments?
JSON has no comments — a document containing them is not valid JSON and is rejected with the parser’s error. Files like tsconfig or package.json use JSONC or JSON5 variants that allow comments; those are outside the JSON standard this tool follows.
Why is the savings percentage negative sometimes?
When the input is already compact, re-serialization can add a few bytes — for example re-escaping a character or normalizing a number’s formatting. The tool reports the true change rather than a floor of zero.