Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

JSON Minifier — Minify JSON Online

Remove all unnecessary whitespace from JSON, validate it at the same time and see exactly how many bytes you save — before and after gzip.

Aktualisiert am
Open file

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: JSON Minifier

  1. Paste JSON or open a .json file.
  2. The JSON is validated and minified instantly; errors show the line and column.
  3. Optionally sort keys alphabetically or write each array item on its own line (NDJSON).
  4. Copy or download the minified JSON.

What is JSON minification?

Minifying JSON removes every space, tab and line break that is not inside a string. The data is unchanged — JSON.parse returns exactly the same object — but the text is smaller. Pretty-printed JSON with two-space indentation is often 20–40 % larger than its minified form.

{
  "id": 42,
  "tags": ["a", "b"]
}

becomes {"id":42,"tags":["a","b"]}.

When to minify JSON

  • API responses and config shipped to browsers — fewer bytes over the network.
  • Storing JSON in databases, Redis, cookies, environment variables or query strings where size limits apply.
  • Embedding JSON-LD or app state in HTML.

For files you edit by hand, keep the formatted version in your repository and minify during the build. Use the JSON formatter to turn minified JSON back into readable form.

Minified vs gzipped size

Gzip and Brotli are very good at compressing repeated whitespace, so after HTTP compression the difference between formatted and minified JSON shrinks to a few percent. The stats show both numbers so you can judge whether minifying is worth it for your case. For big payloads, removing unused fields and shortening repeated keys saves far more.

Sort keys and JSON Lines

OptionUse it for
Sort keysStable output for diffs, caching keys and signatures — two objects with the same data produce identical text
JSON LinesLog files, BigQuery and Elasticsearch bulk imports, streaming — one JSON value per line

Validation

Because the JSON is parsed before it is minified, the tool doubles as a validator: trailing commas, single quotes, comments and unquoted keys are reported with their position. Large numbers keep JavaScript’s precision limits — integers above 253 may lose digits.

Auch gesucht als: minify json, json compressor, compress json, json one line, remove whitespace json, json to ndjson, json lines.

Passende Tools zu: JSON Minifier

  • JavaScript Minifier — Paste JavaScript and get production-ready minified code from Terser — the same engine used by Vite, webpack and Rollup — with real before/after and gzipped sizes.
  • Gzip Compress & Decompress — Compress text or any file with gzip, zlib or raw deflate — or paste Base64 / open a .gz file to decompress it.
  • JSON to CSV — Turn a JSON array into a spreadsheet-ready CSV.
  • XML Minifier — Compact XML documents, feeds, sitemaps and SOAP payloads by removing indentation and comments — with a well-formedness check so nothing breaks.

Häufige Fragen

Does minifying JSON change the data?
No. Only whitespace outside strings is removed. Parsing the minified JSON gives exactly the same values.
How do I convert JSON to one line?
Paste it here — the minified output is a single line. Copy it or download it as a file.
Why is the gzipped size so close for formatted and minified JSON?
Gzip and Brotli compress repeated whitespace extremely well. Minifying still helps when data is not compressed, for example in databases, cookies or URLs.
Is my JSON uploaded?
No. Validation and minification run in your browser.
Kann ich JSON Minifier als Web-App installieren und offline nutzen?
Ja. JSON Minifier ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools