Skip to content
Developer Tools

JS Minifier

Minify JavaScript by removing whitespace and comments to reduce file size. Supports ES6+ syntax in a browser-first workflow.

Free in browser No sign-up required Immediate results
How it works

Run this tool in three short steps.

01

Paste JS

Paste or upload .js file.

02

Auto-minify

Whitespace and comments removed.

03

Copy

Copy or download.

Questions

What people ask before they use this tool.

What does JS minification do?
Removes whitespace, comments, and shortens code to reduce file size without changing behavior.
Does it break my JavaScript?
Basic minification (whitespace/comment removal) is safe. For advanced minification (variable renaming), use terser or uglify-js.
How much reduction?
Typically 20-50% depending on formatting and comments.
Is my code uploaded?
No. All processing in your browser.
Does it remove comments?
Yes. Both single-line (//) and multi-line (/* */) comments are removed.
Does it rename variables?
No. This tool only removes whitespace and comments. For variable renaming, use a build tool like terser.
Can I upload .js files?
Yes.
Can I download?
Yes. Download as .js file.
Does it handle ES6+?
Yes. Arrow functions, template literals, destructuring, etc. are all preserved.
Does it handle TypeScript?
It processes the text as JavaScript. TS types are preserved as-is since this is text-level minification.
Is there a size limit?
It works well for typical snippets, utility scripts, and page-sized JavaScript files in the browser. Very large files depend on your device memory and browser performance.
Does it work on mobile?
Yes.
Does it remove console.log?
No. Use terser or webpack for dead code elimination. This tool handles the simpler whitespace/comment removal that is safe for all JS.
Can I start using it right away?
Yes. Paste JavaScript or upload a file and the minified result appears directly on the page. See all <a href="/developer-tools">Developer Tools</a>. Also try <a href="/json-formatter">JSON Formatter</a>.
What other tools?
HTML Minifier, CSS Minifier, JSON Formatter, and <a href="/text-diff-checker">Diff Checker</a>, plus 20+ more.
Related

Continue the workflow.

AI-powered writing tools

10 writing tools free to try — humanize, rewrite, summarize, translate, and more.

Minify JavaScript by removing whitespace and comments. Paste code or upload a file, review the compressed output immediately, and copy or download it from the same browser-first workspace.

More:  All Dev Tools  · HTML Minify  · CSS Minify