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.

Using this page

Switch tabs for each job: text minifiers (HTML, JS, CSS, XML, SQL, JSON) take pasted source and return a smaller string; the image area is for batch re-encoding to JPEG or WebP with a quality control. For one-off raster edits (format change, resize, metadata strip), the Image convert is usually a better fit. JSON minify complements the JSON formatter when you want readable source in git but compact output elsewhere.

SQL tab and readable source

The SQL minifier removes extra whitespace and line breaks for a compact string. When you need indented SQL for code review or docs, format first with the SQL formatter, then return here for a smaller payload when embedding.

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.”

Nearby workflows on Toolcore

  • SQL formatterwhen you minified SQL here but still need readable source in git.
  • Image convertfor format changes, resize, or EXIF review beyond bulk re-encode.
  • JSON formatterto validate JSON after minifying the text tab.

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.
  • Estimate transfer wins next to gzip/brotli at your CDN—minified text stacks with on-the-wire compression.

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.

Should I use this or Image convert for photos?

Use this page when you mainly want smaller JPEG/WebP bytes in bulk. Use Image convert when you also need format conversion, resize, enhancement, or EXIF review in one workflow.

Common search terms

Phrases people search for that match this tool. See the full long-tail keyword index.

  • html minifier online
  • javascript minifier online
  • css minifier free
  • json minifier online
  • compress jpeg in browser

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