JavaScript Minifier

Minify JavaScript in your browser by removing comments and extra whitespace. Free JS minifier, source stays local.

Result

Processed locally in your browser.

Advertisement

How to use this javascript minifier

Paste JavaScript and click Minify. Line comments, block comments, and unnecessary whitespace are stripped. String literals are left intact.

This is not Terser or esbuild: it does not mangle names or parse TypeScript. Use it for quick size checks and simple scripts.

Advertisement

Example

function hi() { return 1; } minifies toward function hi(){return 1;}

Related tools

More formatting tools

  • JSON FormatterFormat, minify, and validate JSON in your browser. Paste JSON, pretty-print with 2-space indent, or compress to one line. Free, no signup.
  • JSON ValidatorValidate JSON syntax instantly in your browser. Paste JSON to see whether it parses, with a clear error if it does not. Free JSON checker.
  • HTML FormatterBeautify HTML with consistent indentation in your browser. Free HTML formatter, no signup, source stays on your device.
  • CSS MinifierMinify CSS in your browser: strip comments and extra whitespace. Free CSS minifier for quick compression, no upload.
  • SQL FormatterFormat SQL queries with keyword breaks and indentation in your browser. Free SQL formatter for SELECT, INSERT, UPDATE, and more.
  • XML FormatterPretty-print XML with nested indentation in your browser. Free XML formatter and beautifier, no signup.
Advertisement

Frequently asked questions

Does this support TypeScript?

Not as a parser. TS-specific syntax may survive or break. Compile to JS first for best results.

Is this as small as production bundlers?

No. Bundlers also mangle identifiers and fold constants. This minifier is intentionally small and local.

Is JavaScript uploaded?

Processed locally in your browser. We do not upload the text to compute a result.

Last reviewed 2026-08-19. Results stay on your device unless you copy them elsewhere.