JS Minifier
CodeMinify JavaScript by removing comments, collapsing whitespace, and stripping console calls
Paste JavaScript to strip comments, collapse whitespace, and remove `console.log`/`warn`/`error` calls before shipping a quick script, with before/after byte counts to see the savings. The comment stripper tracks string and template-literal state character by character so it won't accidentally strip a `//` or `/* */` that appears inside an actual string, but the console-call remover is a simpler single-line regex pattern that can break on a call containing nested parentheses. This is surface-level minification only: there's no real variable-name mangling or dead-code elimination like a tool such as Terser or esbuild would do, and the option to enable mangling exists in the interface but isn't actually implemented. For a real production build, reach for a proper bundler and minifier rather than this tool, which is meant for a one-off script rather than a build pipeline.
How to use JS Minifier
- 1.Paste JavaScript source to strip comments, collapse whitespace, and remove `console.log` calls before shipping to production.
- 2.Use it to quickly shrink a small script or snippet without setting up a full bundler pipeline like esbuild or Terser.
- 3.Compare the minified byte size against the original to estimate the payload savings for a script tag.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/js-minify \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"input": "function greet(name) { return \"Hello, \" + name; }"}'Get an API key from your dashboard · Full API docs →