Dev Bench / FREE ONLINE TOOL

JavaScript Minifier

Minify a JavaScript snippet with a real JavaScript parser.

No signupRuns on your deviceFree to use
Your workspace Local processing

Loading your tool…

When to use javascript minifier

Use the minifier to reduce a standalone script or inspect the effect of whitespace removal and compression. The source is parsed without executing it. If syntax is invalid, an error is shown instead of producing a partial file. Keep the original code for maintenance and test the output in its real application context.

How it works

  1. Paste JavaScript source.
  2. Minify it without running the code.
  3. Copy or download the output.

Try this example

function greet(name) { const message = "Hello, " + name; return message; }

Before you export or rely on the result

This is not a bundler or TypeScript compiler. Top-level variable mangling is disabled. Scripts that depend on function names or source inspection need additional review.

Does this tool upload my input?

No. This tool processes input in your browser. Optional advertisements are separate third-party content and load only when you allow ads. See the privacy notice for hosting logs and advertising details.

Can I use the result without creating an account?

Yes. JavaScript Minifier is free to use without an account. Review the result against the limits above and the requirements of the app or document where you plan to use it.

Keep going with another tool.

View all tools