Minify JavaScript, CSS or HTML: strip comments and unnecessary whitespace and see the original size, the minified size and the savings.
Your code never leaves your browser. No uploads, no tracking, all local.
Paste your code, pick the format, and press Minify. The tool strips comments and unnecessary whitespace entirely in your browser and shows you the original size, the minified size, and the savings percentage.
JavaScript, CSS and HTML. Pick the format before minifying so the tool knows which comment syntaxes and whitespace rules to apply. JavaScript line comments (//) and block comments (/* */), CSS block comments, and HTML comments are all removed, along with unnecessary whitespace.
No, and it does not aim to be. This is a conservative, zero-dependency minifier: it strips comments and redundant whitespace without renaming variables, shortening identifiers, or analyzing the code. Expect solid savings from removing comments and blank lines, not maximum possible compression. For production builds, run a real bundler/minifier afterwards.
The tool is careful not to touch comment-like text inside string literals — "// not a comment" in JavaScript stays intact. That said, no lightweight tool can parse every edge case (regex literals containing quotes, unusual HTML inside JS templates, and other oddities). Always diff the output and test it before shipping.
No. Everything runs locally in your browser with zero uploads and zero tracking. Your code never leaves the page — not to a server, not to an ad network, nowhere.
It depends on how much removable content your source contains. Code with many comments and blank lines shrinks the most; already-dense code shrinks less. CSS often saves more than JS because whitespace around braces, commas and colons is purely cosmetic there, while JS whitespace is sometimes load-bearing.
If you just finished with Code Minifier, the natural next steps are JSON Formatter & Validator, Text Diff, Markdown to HTML, or browse every tool in Privacy File Tools.