Home Tools About Us ♥ Support Us
⚡ JavaScript Minifier

Minify, beautify &
validate JavaScript

Strip comments and whitespace, reformat with your indentation style, catch syntax errors, and batch-process files — all instantly, in your browser.

Options

The mangler is a best-effort, whole-word renamer (not full scope analysis) — verify output before shipping it. See FAQ below.

Code

Input
0 chars
Output
0 chars

🕘 Local History

Saved only on this device — never uploaded anywhere.

No history yet.

How to use every option

  1. Pick a mode — Minify shrinks your code, Beautify reformats it for readability, Validate only checks for syntax errors, and Batch handles many files at once.
  2. Choose indentation (Beautify) — 2 spaces, 4 spaces, or tabs.
  3. Choose a layout — "Full nested indentation" indents every block; "Flat" puts one statement per line with no extra indent for nested blocks.
  4. Set quote style — keep quotes as written, or force everything to single or double quotes.
  5. Pick a line ending for beautified output — LF for Unix/macOS/Linux, CRLF for Windows.
  6. Toggle "Keep comments" to preserve comments in the minified output; combine with "Keep only JSDoc" to drop line comments but keep /** */ blocks.
  7. Remove console/debugger — strips console.*(...) calls and/or debugger; statements before output.
  8. Remove blank lines / trim trailing whitespace — tidy up beautified output further.
  9. Ensure trailing semicolons adds a semicolon to statement lines that are missing one, where it's safe to do so.
  10. Add or strip 'use strict' — insert a top-of-file strict-mode directive, or remove an existing one.
  11. Try the experimental mangler — shortens declared variable names; always re-check output before using it in production.
  12. Paste, upload, or drag a .js file into the input box, or click Sample to try one instantly.
  13. Click Run, then copy the result or download it as a .js file. Size stats and a feature/warning report appear below the editors.
  14. For multiple files, switch to Batch mode, upload your .js files, run, and download them individually or as one ZIP.
  15. Revisit past runs from Local History, or clear it whenever you like.

One JavaScript tool, every workflow

Minify
Strips comments and whitespace while preserving behavior, with optional console/debugger removal.
Beautify
Reformats with your choice of indentation, layout, quote style, and line ending.
Syntax Validation
Parses your code with the browser's own JS engine and reports the error location.
📦
Batch + ZIP
Minify many files at once and download them individually or bundled into a ZIP.
📏
Size & Gzip Stats
See exact byte savings and an estimated gzip size at a glance.
🧪
Feature Detection
Flags modern syntax (arrow functions, let/const, async/await) and risky patterns (eval, with).
🔤
Quote & Semicolon Control
Normalize quote style and add missing trailing semicolons where it's safe to do so.
🕘
Local History
Every run is saved to your browser only, with one-click reload or full reset.

Frequently Asked Questions

Yes. Smaller files download and parse faster, which helps page load time and Core Web Vitals, especially on mobile connections.

Yes, in your own build pipeline via source maps. This browser tool doesn't generate a source map — keep your original, readable source file for debugging and only ship the minified output.

No. Minification only removes formatting — it isn't encryption or obfuscation. Anyone can beautify and read minified JavaScript. Never rely on it to hide secrets or logic.

No. Minifying, beautifying, and validating all run locally in your browser. Nothing you paste or upload is sent to or stored on our servers.

It parses your code with the browser's own JavaScript engine to catch syntax errors — it does not execute your code. Top-level import/export module syntax and a bare top-level "return" aren't supported by this check; wrap such code in a function first.

It places each statement on its own line with normalized spacing, but skips the extra indentation for nested blocks — a middle ground between fully minified and fully indented code.

It's marked experimental. It renames declared variables using whole-word matching rather than full scope analysis, so it can occasionally rename the wrong thing in edge cases. Always test the output before shipping it.

Yes. Use Batch mode to upload several .js files; each is minified independently and you can download them individually or together as a ZIP.

Related tools

Browse Other Categories

Support EaseDev Studios

All tools are free. If they've saved you time, consider supporting us.

Buy Us a Coffee

A quick one-time gesture that means a lot.

Buy a Coffee →
🎗️

Become a Patron

Support us monthly and help build more tools.

Join on Patreon →