OOnDevice

Code Minifier

Minify HTML, CSS, and JavaScript — right in your browser. See original vs minified size with percentage reduction.

Works offlineNothing uploaded

How to use it

1

Paste your code

Enter JavaScript, CSS, or HTML code in the input area.

2

Select the language

Choose the code language for proper minification.

3

Copy minified output

Click copy to grab the minified code with reduced file size.

When to use Code Minifier

Your Webpack bundle is larger than expected and you want to verify that a specific utility file is actually being minified — or you're shipping a one-off inline script in an HTML email template where a full build tool is overkill. Paste your JavaScript, CSS, or HTML and esbuild-wasm compresses it in the browser: stripping whitespace, collapsing comments, and shortening variable names where safe. The before/after byte count sits right next to the output so you know exactly what you're saving before you ship it. Processing happens on your machine, and your code — including any business logic or unpublished feature flags — never reaches an outside server. Paste, minify, copy.

  • Verify a utility module is shrinking before bundling it
  • Minify an inline script going into an HTML email template
  • Strip comments from a CSS file before a CDN deploy

About this tool

Minify HTML, CSS, or JavaScript before deploying — strip whitespace, comments, and redundant characters to cut file size without touching logic. See the before and after byte counts side by side so you know exactly what you're saving. Useful as a sanity check when your build tool's output looks suspiciously large, or for quickly minifying a one-off snippet you're embedding in an email template or inline script tag. Processing stays on your machine — the code never leaves your browser, which matters when it includes internal business logic or unpublished features. Paste, minify, copy.

Frequently asked

What does minification do?
Minification removes unnecessary characters like comments, whitespace, and line breaks from code without changing its functionality, reducing file size for faster loading.
Which languages are supported?
This tool supports basic minification for HTML, CSS, and JavaScript. It strips comments, collapses whitespace, and removes unnecessary characters.
Is this code minifier private? Does it send my code to a server?
No. esbuild-wasm runs in this browser tab — the JavaScript, CSS, or HTML you paste is minified locally, and internal business logic or unpublished feature flags never reach an outside server.