Compress & minify

Client

Shrink code and data for the wire: pick a language tab and minify, or drop images for JPEG/WebP output with a quality slider. Processing runs entirely in your browser.

Workspace

Minify HTML, JavaScript, CSS, XML, SQL, or JSON in one place, or batch-compress raster images (JPEG / PNG / WebP) locally. Everything stays in your browser.

?

JavaScript uses terser; CSS uses csso; XML uses fast-xml-parser. HTML strips comments and collapses whitespace between tags (not a full HTML5 minifier). SQL uses a comment stripper plus whitespace collapse—avoid pasting secrets; quoted strings are best-effort.

Images are re-encoded with your quality setting; PNG sources are rasterized to JPEG or WebP. This is lossy for photos, not “lossless PNG.”

Common use cases

  • Minify HTML, CSS, JavaScript, XML, SQL, or JSON before deployment to reduce bytes on the wire.
  • Re-encode JPEG, PNG, or WebP images with a quality slider for faster pages (processing stays local).
  • Pair SQL minify with the SQL formatter when you need readable source in git but compact output for embedding.

Common mistakes to avoid

  • Minifying code you still need to debug in production

    Keep non-minified sources in version control. Minified output is harder to read in stack traces.

  • Over-compressing images for print or zoom-heavy UIs

    Low quality looks fine on small screens but breaks down on large displays—preview after compression.

  • Assuming minifiers preserve every comment

    License banners and important comments may be stripped depending on settings—verify legal requirements.

FAQ

Are my files uploaded to Toolcore?

No. Text and image processing run in your browser using client-side libraries.

Where is SQL formatting (pretty-print)?

Use the dedicated SQL formatter tool for readable queries; use this page’s SQL minify tab for a smaller single-line form.

Why is my minified bundle larger than expected?

Some inputs do not minify much, or the tool may preserve structure for safety. Compare gzip/brotli at the CDN for total transfer size.

Related utilities you can open in another tab—mostly client-side.