Minifier
Minify JavaScript, CSS and HTML directly in the browser.
About this tool
The Minifier reduces the size of JavaScript, CSS, and HTML files directly in the browser by stripping whitespace, comments, and unnecessary characters without changing code behavior. The tool displays the original size, the minified size, and the percentage reduction achieved.
To use it, paste your code into the text area, select the type (JavaScript, CSS, or HTML), and the minified result appears immediately. Use the "Copy" button to transfer the minified code to your clipboard. There are no extra steps — paste, see the result, copy.
Common use cases include minifying inline CSS snippets before adding them to HTML emails, compacting small scripts to be embedded in pages without going through a bundler, reducing the size of HTML templates for email marketing systems, and quickly checking how much space a specific piece of code can save before setting up a full build pipeline. Developers also use the tool to inspect what a minifier does to specific code without needing Node.js installed.
All processing happens locally in your browser using pure JavaScript minification algorithms. No code is sent to external servers. No account needs to be created and no tools need to be installed.
Frequently asked questions
Which languages are supported?
JavaScript, CSS, and HTML. Select the correct type before minifying to get the best result.
Does minification change the behavior of the code?
No, for valid code. Minification only removes spaces, line breaks, and comments. For JavaScript, local variable names may be shortened, but the logic remains identical.
Is this tool free?
Yes, completely free and no signup required.
Is my code sent to any server?
No. All minification processing happens locally in your browser. Your code never leaves your device.
Does it work on mobile?
Yes. The interface is responsive, though pasting large blocks of code is more practical with a physical keyboard.