JavaScript Minifier

Minify a copy and retain your original source for maintenance. Run the application tests against the file you will deploy.

Input

Result

Run the tool to see your result here.

When to use it

Minify a copy and retain your original source for maintenance. Run the application tests against the file you will deploy.

Try a worked example

Choose Load sample to fill the controls. Select Run tool and compare the result.

Minify a function with descriptive parameters and compare actual byte counts.

// Calculate a campaign rate
function rate(clicks, impressions) { return clicks / impressions * 100; }
Input: 102 bytes. Output: 35 bytes.
function rate(n,r){return n/r*100}

How it works

Use esbuild to parse JavaScript and transform whitespace, identifiers and syntax without executing the supplied program.

Check the result in your workflow

Supply a representative function and review the reported UTF-8 bytes. Run your own test suite against the minified production artifact. Compression and cache behavior should be measured separately in the network panel.

Limits and checks

Imports are not bundled. The tool does not provide production source-map management or test runtime behavior.

Your input stays in the browser

The tool keeps these inputs in the page while you work and does not send them to a conversion service.

Related tools and guides

Website Performance

CSS Minifier

Use on styles you already test. Keep readable source and verify the component in the browser after replacing the shipped asset.

Website Performance

Bandwidth Calculator

Use transfer bytes from a representative navigation, then run separate cold-cache and repeat-visit scenarios.

Website Performance

Image Resizer

Prepare screenshots at the display width, and keep a larger master for another layout.

Search ByeGA4