Minify JS, CSS, HTML and TypeScript
Code Minifier strips comments and collapses whitespace for JS, TS, CSS, and HTML entirely in your browser — nothing is uploaded to a server. For JS/TS and CSS, it's string-aware: it never touches the contents of quoted strings, template literals, or /regex/ literals, so a URL like https://example.com inside a string or a template literal containing // won't get corrupted. For HTML, it's a tag-aware scanner rather than a plain-text regex: it never mistakes a '<!--' or '-->' inside a quoted attribute value for a real comment delimiter, and it copies the contents of <script>, <style>, <pre>, and <textarea> through completely untouched instead of collapsing their whitespace. This is a lightweight minifier, not a full parser — it doesn't rename variables or eliminate dead code like tools such as Terser.
Is Code Minifier free to use?
Yes, it's completely free with no signup required.
Will minification break my code?
For JS, TS, and CSS, comment-stripping and whitespace-collapsing skip over string, template literal, and regex contents, so things like URLs inside strings are left intact. For HTML, comment-stripping only recognizes real '<!--' ... '-->' delimiters in actual markup position — an attribute value that happens to contain that text won't be misread as a comment and won't cause real content to be deleted — and <script>, <style>, <pre>, and <textarea> content is preserved exactly as written rather than whitespace-collapsed.
What languages does it support?
JavaScript, TypeScript, CSS, and HTML. There's no JSON-specific mode (use JSON Minifier for that) or support for other languages.
Does it store or upload my code?
No, everything runs locally in your browser; your code is never sent to a server.