Skip to content
jsonforge.app

JSON Minifier

Minify and prettify JSON with size statistics. Compress or format JSON instantly.

JSON input

Loading editor…

Minified JSON

Paste JSON to see the minified result with size statistics.

Qu'est-ce que JSON Minifier ?

A JSON minifier removes all unnecessary whitespace from JSON to produce the smallest possible valid output. It strips out spaces, line breaks, and indentation while preserving the exact same data structure — perfect for reducing file size in production, optimizing network payloads, or storing JSON compactly. The reverse operation (prettifying) adds back readable formatting with proper indentation. Minification is safe and lossless: the minified JSON parses to the exact same JavaScript objects as the original, just without the human-friendly spacing. This tool shows you the original size, minified size, and percentage reduction so you can see exactly how much space you're saving.

Comment utiliser JSON Minifier

  1. Paste your JSON into the left panel — it can be formatted, minified, or somewhere in between.
  2. The minified output appears instantly on the right with size statistics showing bytes saved and reduction percentage.
  3. Click Copy to grab the minified JSON, or use the prettify option to add formatting back.
  4. Toggle between minify and prettify modes to compress or expand JSON as needed.

Exemples

Formatted JSON → Minified

Entrée

{ "name": "Production", "replicas": 3, "enabled": true }

Sortie

{"name":"Production","replicas":3,"enabled":true}

Large JSON → Size savings

Entrée

{ "users": [ {"id": 1, "name": "Alice", "active": true}, {"id": 2, "name": "Bob", "active": false} ], "metadata": {"count": 2} }

Sortie

{"users":[{"id":1,"name":"Alice","active":true},{"id":2,"name":"Bob","active":false}],"metadata":{"count":2}}

Erreurs courantes

  • Assuming minification changes numeric or boolean values — minification only removes whitespace, so the parsed output is identical; it doesn't convert numbers to strings or modify data in any way.
  • Thinking minified JSON is 'compressed' like gzip — minification removes whitespace but it's still plain text, so combine it with gzip or brotli for additional size reduction.
  • Expecting prettify to restore original formatting exactly — prettify adds consistent indentation but canonicalizes formatting rather than reversing minification losslessly.

Pourquoi utiliser cet outil

  • Instant size reduction with real-time statistics showing original size, minified size, and percentage reduction.
  • Lossless and safe — minified JSON parses identically to the original, with no data transformation or risk beyond whitespace removal.
  • Bidirectional — switch between minify and prettify modes to compress or expand JSON as needed, with the same validation and error handling.

Questions fréquentes