developers.do

JavaScript Minifier

Strip comments and whitespace from JavaScript while preserving string literals, template literals, and regex syntax — no AST, no variable renaming, just fast cosmetic minification

Saved 53 chars (33%)Input: 163 charsOutput: 110 chars
function sayHello(name){const greeting="Hello, "+name;console.log(greeting+"!");return true}sayHello("World");
Note: This is a regex-based minifier — it strips comments and whitespace but does notrename variables, eliminate dead code, or do any AST traversal. For production minification use esbuild --minify or terser. Useful for quick dev-time compressing of doc-snippets and inline scripts.