JavaScript Minifier & Beautifier

Online JavaScript Minifier / Beautifier — runs entirely in your browser.

Input JavaScript

An in-browser JavaScript minifier and beautifier. Paste source to compress (uglify) for production, or paste minified code to format it back into readable form. Useful for quick one-off tasks without setting up a build pipeline.

When to minify

Minification removes whitespace, shortens identifiers, and strips comments. The output is typically 30 to 60 percent smaller and parses faster. Use it for production bundles, embedded snippets, and inline scripts. Keep the original source under version control — once minified, code is hard to debug without sourcemaps.

When to beautify

Beautification re-adds whitespace and indentation so minified code is readable. Use it when reading third-party libraries, debugging vendor scripts, or inspecting downloaded code. Variable names will not be restored — minifiers replace them with single letters and that information is lost.

FAQ

Does minification work for ES modules?
Yes. Modern minifiers preserve import/export syntax. Avoid mixing module and script-mode code in one minify pass.
Will minified code run in older browsers?
Minification preserves syntax but does not transpile. If you need IE or older Safari support, transpile with Babel or SWC first, then minify.
You may also like these!