JS / CSS / HTML Minifier

Shrink JavaScript, CSS or HTML for production. JS minification uses Terser for correctness; CSS/HTML use lightweight whitespace stripping.

Paste JavaScript, CSS, or HTML and get a minified version with whitespace, comments, and unnecessary characters stripped out, reducing file size for production deployment. JavaScript minification uses Terser, the same engine behind most modern bundlers, which safely renames variables and removes dead code without changing behavior. CSS and HTML use lighter whitespace-stripping since they don't need the same safety guarantees. Runs entirely in your browser.

Runs in your browser // nothing is uploaded

Runs on your device. This tool processes your file inside this browser tab. Nothing is uploaded, so it also works offline once the page has loaded, and closing the tab discards the file from memory.

Loading tool

How it works

  1. 01

    Paste your JavaScript, CSS, or HTML code.

  2. 02

    Select the matching language tab.

  3. 03

    Copy the minified output.

Details

Runs
In your browser
Files uploaded
No
Cost per run
Free
Sign-in
Not required
Works offline
Yes, once loaded

Last updated 2026-08-12

Common questions

Is JS minification safe for production?

Yes - it uses Terser, the same minifier behind most modern JS bundlers.

Does it upload my code?

No - minification runs entirely in your browser.

Will minified JS still work correctly?

Terser is designed for production use and preserves behavior while shrinking size - it's used inside many popular build tools.

How much smaller will my file get?

It depends heavily on how much whitespace and comments the source has, but 20-60% reduction is common for unminified code.

Use this from your code

This tool is also a REST endpoint, so you can run it in a pipeline instead of by hand. It is free and needs no API key. See the API reference for every parameter.

curl -X POST https://fileoven.com/api/v1/tools/minifier \
  -H "Content-Type: application/json" \
  -d '{"code":"const a = 1;"}'

Related tools