JavaScript, CSS & HTML Minifier

Minify JavaScript with Terser, CSS and HTML safely, and see exactly how many bytes you saved. Free, no sign-up, and your files never leave your device.

Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.

Make files smaller for production. JavaScript is minified with Terser (dead code removal, shortened variable names, compressed expressions); CSS and HTML are minified conservatively — comments and extra whitespace are removed, while strings, url() values and <pre>/<textarea> content are left untouched. The saving is shown below the output.

Step by step

  1. Choose the language: JavaScript, CSS or HTML.
  2. Paste code: Or open a file.
  3. JavaScript option: Shorten variable names (mangling) gives the biggest saving; turn it off if code relies on function names.
  4. Download: Save as minified.min.js, minified.min.css or minified.html.

Handy for

Small sites

Minify assets for a site without a build tool.

Inline snippets

Shrink scripts you embed in HTML or emails.

Size checks

See how much a file shrinks before adding a build step.

Bookmarklets

Compress JavaScript into a single line.

Good to know

  • Licence comments starting with /*! or containing @license are kept.

  • ES modules (import/export) are detected automatically.

  • Always keep the original source — minified code is for shipping, not editing.

Questions

Is minified code the same as obfuscated?

No. Minification only makes code smaller; it can be formatted back into readable code, e.g. with the HTML/JS formatter.

Is my data sent anywhere?

No. Everything is processed by JavaScript in your browser tab — nothing you paste or open is uploaded, logged or stored on a server. You can even use the tool offline once the page has loaded.

More Developer Tools tools

All Developer Tools tools