Skip to main content
Toolzum

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

100% Local Browser Native

How to Use the JS Minifier

1. Paste JS

Paste JS text into the input area. Nothing runs until you trigger it.

2. Minify

Minify to one compact line.

3. Copy minified

Copy the minified output.

Similar Tools You Might Need

See all

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.

Last updated October 2026