Free Tool

JSON Minifier

Shrink your JSON payload in one click. Remove whitespace, strip comments, and cut bytes — free and private, no data leaves your browser.

Loading editor…

How to Use the JSON Minifier

  1. 1

    Paste or upload your formatted JSON into the editor above.

  2. 2

    The editor shows a live preview of the byte count before and after minification.

  3. 3

    Click "Minify" to strip all whitespace and produce a single-line JSON string.

  4. 4

    Review the compression percentage and byte savings shown in the toolbar.

  5. 5

    Click "Copy" to copy the minified output, or "Download" to save it as a .json file.

Key Features

Maximum Compression

Removes all non-significant whitespace — spaces, tabs, and newlines — to produce the smallest possible valid JSON output.

Live Byte Counter

See the original size, minified size, and percentage saved in real time as you type or paste JSON.

Comment Stripping

Accepts JSONC and JSON5 input — strips comments before minifying, producing clean standard JSON output.

One-Click Download

Download the minified output as a .json file directly from the browser — no server round-trip required.

Why JSON Flash?

  • Processes JSON entirely in your browser — zero server uploads.
  • Accepts JSONC and JSON5 input, outputs clean standard JSON.
  • Live byte savings counter updates as you type.
  • Free with no size limits on reasonable files (up to 10 MB).
  • Batch minification for multiple files on the Pro plan.

Frequently Asked Questions

What is JSON minification?

JSON minification removes all unnecessary whitespace — spaces, tabs, and newlines — from a JSON document without changing its data. The result is a single-line string that is identical in meaning but smaller in bytes.

How much does minification reduce JSON size?

Typical reduction is 20–40% for already-formatted JSON. Heavily indented documents with long key chains can see reductions of 50% or more. Use the byte counter in the editor to see the exact saving.

Is minified JSON still valid JSON?

Yes. Whitespace is optional in the JSON specification. Minified JSON is fully valid and will parse correctly in any standards-compliant JSON parser.

When should I minify JSON?

Minify JSON before sending it over HTTP APIs, embedding it in HTML or JavaScript source files, storing it in databases, or transmitting it over WebSocket connections. Every byte saved reduces latency and bandwidth cost.

Does minification remove JSON comments?

Standard JSON does not support comments, so valid JSON cannot contain them. If your source is JSONC or JSON5 (which allows comments), the minifier strips comments before outputting valid JSON.

Can I minify JSON and then re-format it?

Yes. Use the JSON Formatter to restore indentation at any time. Minification is completely reversible because no data is removed — only whitespace.

What is the difference between minification and compression?

Minification removes human-readable whitespace at the text level. Compression (gzip, Brotli) uses algorithms to encode repeated byte patterns in the binary stream. Most HTTP servers apply gzip on top of minification, so you benefit from both.

Can I minify multiple JSON files at once?

Pro users can upload a ZIP archive or paste multiple JSON documents to minify them in a single batch operation, with the result available as a downloadable ZIP.

Unlock Pro — unlimited AI, 10 MB files, API access

Starting at $4/mo · 14-day money-back guarantee

  • Batch minify a ZIP of JSON files
  • Minify JSON fetched from a URL
  • Advanced key-sorting for deterministic output
  • Minify + gzip size preview
  • API endpoint for programmatic minification
Upgrade →