All Tools
1049+ free tools

JavaScript Minifier

A basic, safe JavaScript minifier: strips line/block comments and collapses whitespace while preserving string, regex and template literals. Does not mangle names.

What this does (and doesn't) do

  • Strips // and /* */ comments.
  • Collapses runs of whitespace into single spaces (or removes them entirely when not needed).
  • Preserves string literals ("...", '...'), template literals (`...`) and regex literals (/.../flags).
  • Does not mangle identifiers, dead-code-eliminate, or use advanced transforms. For production use, prefer a real minifier like Terser or esbuild.

Related dev tools

AI Prompt Formatter
Structure & format prompts for any AI model with templates
JSON Visualizer
Interactive JSON tree explorer with paths & statistics
Regex Builder
Build & test regex with live highlighting & cheat sheet
JSON Formatter
Format, beautify & validate JSON