Developer Utilities · Free tool
JavaScript Minifier
Paste JavaScript and shrink it by stripping comments and whitespace. A fast, safe in-browser minifier — no accounts.
Updated April 2026
Simple whitespace/comment removal. Not safe for regex-heavy code — use a real tool like Terser for production builds.
What it does
Paste some JavaScript, click Minify, get a smaller version — strips line and block comments, collapses whitespace, and tightens spaces around punctuation. Useful for trimming a snippet before pasting into an inline script tag or a config file. No code ever leaves your browser.
Caveat: this is a conservative regex-based minifier. It preserves quoted strings and template literals but won’t re-rename variables, shorten booleans, or fully parse regex literals. For production builds, use Terser — every modern bundler wraps it.
How to use it
- Paste your JavaScript into the textarea.
- Click Minify — output and saved bytes show below.
- Copy the minified version.
- For heavy regex-based code, verify the result still runs.