§

Paste JSON

§

Minified output

text
§

Saved %

  • Original size
  • Minified size
  • Saved
  • Saved %

Trimming JSON to its smallest valid form pays off everywhere bytes are billed: AWS API Gateway counts request and response payload size against its 10 MB cap, CloudFront and Cloudflare bill egress per gigabyte, and the US federal CKAN data portals at data.gov publish multi-gigabyte JSON exports that engineers download to laptops in the field. UK Open Banking PSD2 endpoints exchange JWS-signed JSON between aggregators and high-street banks where every kilobyte propagates through audited TLS-pinned channels. Healthcare HL7 FHIR resources, IoT telemetry from Tesla and Ford connected vehicles, and CDN-fronted SaaS dashboards all see real cost and latency wins when JSON is minified before it leaves the browser.

What is JSON minification?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format defined by RFC 8259 and ECMA-404. Minification strips every space, tab, and newline that sits outside a string literal — values are preserved byte-for-byte, only the cosmetic whitespace is removed. The output parses to exactly the same value as the input.

How does JSON minification work?

Your input is processed entirely in your browser using the built-in JSON.parse and JSON.stringify functions. The high-level steps are:

  1. Your input is read from the textarea verbatim — every byte you pasted is kept in memory locally.
  2. The browser parses it with JSON.parse. If the input is not valid JSON, the parser throws a SyntaxError that is caught and surfaced verbatim — your text never leaves the page.
  3. When parsing succeeds, the parsed value is re-emitted with JSON.stringify(value) — no indent argument — producing the shortest valid form of the same value.
  4. The byte length of both the original and the minified text is computed with new TextEncoder().encode(...).byteLength — the same UTF-8 byte count an HTTP server would see on the wire.
  5. Output is written to the readonly textarea, the metric strip reports the byte deltas with a percentage saved, and the Download button packages the result as a .min.json file you can ship.

Why minify JSON with this tool?

  • Privacy: every parse, minify, and metric pass happens in your browser. The JSON never reaches our servers — no upload, no telemetry, no account.
  • Real byte numbers: original size, minified size, and savings are computed with TextEncoder so you see the actual UTF-8 byte deltas a CDN or API gateway will bill you for.
  • Zero data loss: minification is purely cosmetic — every value parses to the same JSON tree, so it is safe for production payloads, manifests, and embedded fixtures.
  • Fast: pure JSON.parse + JSON.stringify handle typical clipboard-sized payloads instantly, with no external libraries to load.

What are common applications of JSON minification?

Stripping insignificant whitespace from JSON shows up across web development, data engineering, and embedded systems:

  • API payload reduction: shrink request and response bodies before they cross a metered API gateway, a paid egress link, or a satellite link.
  • Embedding in HTML: stuff a JSON blob into a data-* attribute or a <script type="application/json"> tag without leaking pretty-printer whitespace into the rendered page.
  • Smaller localStorage: cut localStorage / IndexedDB quota usage by writing minified JSON instead of pretty-printed JSON, which is especially valuable on mobile browsers with strict per-origin storage limits.

What does a JSON minification example look like?

Pasting a 1.2 KB pretty-printed configuration file (about 1,225 bytes with two-space indents) and pressing Minify typically collapses it to under 0.4 KB — a 66% saving — with every key and value preserved exactly. The downloadable output.min.json file is byte-identical to what an HTTP server would emit with Content-Type: application/json and no formatting middleware.

Does this run in my browser?

Yes. The minify pipeline is pure JSON.parse + JSON.stringify running inside the browser tab. Nothing is uploaded, no service worker proxies your input, and the page makes zero network requests for the minify step itself. The only outbound traffic is the standard page-load assets (CSS, fonts, analytics) — your JSON never reaches Ultim8Soft.

Why minify JSON?

Minified JSON parses to exactly the same value as the pretty-printed source but is smaller on the wire and in storage. Smaller payloads mean lower CDN egress bills, faster mobile downloads, less memory pressure inside service workers, and tighter fits inside fixed-size envelopes like JWT payloads, embedded HTML data-* attributes, and localStorage quotas. For high-volume APIs the byte savings compound — a 30% reduction on a 1 GB/day endpoint saves roughly 9 GB per month.

Does minification lose data?

No. JSON minification only removes whitespace that sits outside string literals — spaces, tabs, and newlines that the spec already classifies as insignificant. Every key, value, number, escape sequence, and string character is preserved byte-for-byte. The output parses to a value that is deepEqual to the input. The cosmetic indentation is the only thing that disappears.

What is the difference between the formatter and the minifier?

The companion JSON Formatter goes the other direction: it expands whitespace so humans can read nested structures. The Minifier strips that whitespace back out for transport and storage. The two tools are inverses — round-tripping a JSON document through Formatter → Minifier yields the same byte-string you started the minifier with, because both operate on the parsed value, not on cosmetic markup.

This JSON minifier uses the same parser your Node.js, Deno, or browser runtime uses and produces output that is byte-identical to what a no-frills HTTP server would emit. Paste any JSON above, copy the output, or download it as .min.json.