JS Minifier
Strips comments, whitespace, and shortens local variable names in JavaScript source without altering execution semantics. No signup or account required.
Runs on Terser
How to Use the JS Minifier
Similar Tools You Might Need
See allCSS Minifier
Minify CSS by stripping whitespace, comments, and dead semicolons — smaller stylesheets instantly. Shrink a 50 KB file by 30% — local clean-css work, free, no signup.
HTML Minifier
Minify HTML by collapsing whitespace, stripping comments, and pruning optional tags. Slim landing pages for faster loads — local processing, free, no signup.
Code Beautifier & Minifier
Beautify or minify HTML, CSS, JavaScript, XML, ERB, LESS, and SCSS with a single click. HTML, CSS, JS, XML, and more normalize in one pass — local processing, free, no signup.
AI Translator
Translate text between 16 languages with automatic source detection via the AI API. Bloggers localize a 500-word post in seconds — 1 credit per translation, sign in free for 5.
Wheel of Names
Spin a colorful prize wheel with your names — giveaways, classrooms, team picks. Draw winners live with drama — free, local, no signup.
Frequently Asked Questions
What does the minifier remove?
Comments, extra whitespace, line breaks, and optional local variable name shortening. The output is functionally identical JavaScript with a significantly smaller file size.
Will minification break my code?
No. The Terser engine preserves execution semantics. It only removes dead code, comments, and whitespace — never logic, function calls, or variable references.
Can I also beautify code with this tool?
This tool focuses on minification. For beautifying or formatting JavaScript, use the Code Beautifier tool instead.
How much smaller does minified JS get?
Typically 30-70% reduction depending on how much whitespace and commenting your original code has. Code with extensive comments sees the largest savings.
Is my source code uploaded?
No. Minification runs entirely in your browser using the Terser library. Your JavaScript source never leaves your device.
How are the Before / After / Savings numbers computed?
Both panes are weighed with new Blob([text]).size. Savings = (original - minified) / original x 100, shown with 1 decimal, while sizes show 2 decimals in KB. CSS mode also collapses ;} to } and HTML mode strips <!--...--> comments.
Related Developer Tools
JavaScript Formatter
Format JavaScript with consistent indentation, semicolons, quotes, and brace style. Standardize legacy scripts before refactor — local processing, free, no signup.
Code Beautifier & Minifier
Beautify or minify HTML, CSS, JavaScript, XML, ERB, LESS, and SCSS with a single click. HTML, CSS, JS, XML, and more normalize in one pass — local processing, free, no signup.
Last updated October 2026