All 127 tools

JavaScript Minifier

Minify JavaScript by removing comments, indentation and extra spaces while keeping strings, regex and template literals intact. See the size saved.

Runs in your browser. Nothing you paste is sent anywhere.

654 B → 451 B (31% smaller)

Output

About this tool

A safe minifier for scripts and snippets: it strips comments and whitespace but never renames variables or changes code, so the result behaves exactly like the original. Line breaks that JavaScript needs for automatic semicolons are kept.

How to use it

  1. Paste your JavaScript or open a .js file.
  2. Leave 'Keep licence comments' on if the code includes a licence header.
  3. Copy the minified code or download it as script.min.js.

Questions

Will minified code still work?

Yes. Only comments and unneeded whitespace are removed. Strings, template literals and regular expressions are copied exactly, and line breaks that could change meaning are kept.

Does it rename variables like Terser?

No. Renaming and dead-code removal save more bytes but need a full JavaScript parser. For production builds use your bundler (Vite, webpack, esbuild); this tool is for quick jobs.

Are licence comments kept?

Yes, if you leave 'Keep /*! licence */ comments' on. Comments starting with /*! are kept by convention.

Last reviewed 16 October 2026.