There are two kinds of JavaScript minification, and the difference matters more than the name suggests.
The aggressive kind rewrites your code. Variables are renamed to single letters, dead branches are removed, functions are inlined, and the output bears little resemblance to the input. Tools like Terser and esbuild do this, and the size reduction is dramatic - often 60% or more.
The conservative kind only removes characters that never mattered: comments and unnecessary whitespace. Every identifier keeps its name. Every statement stays where it was. The saving is smaller, usually 20% to 35%, but the behaviour is guaranteed identical.
This tool does the second kind, deliberately.
Why the conservative approach
Renaming variables is safe only if the tool can see every reference to them. That assumption breaks in ways that are easy to miss. Code that calls a function by name from an HTML attribute. A library that reads Function.prototype.toString. Anything using eval. Dependency injection frameworks that inspect parameter names. Web components registered by string. In each case the renamer changes something that another part of the system was looking for by name, and the failure appears at runtime rather than at build time.
For a script you are pasting into a page footer, a snippet going into a tag manager, or a small file you are uploading by hand, that risk is not worth taking for an extra 20%. If you have a proper build pipeline with tests, use a proper minifier there.
Strings and regular expressions are protected
The hard part of minifying JavaScript is knowing when a character means what it appears to mean. A // inside a string is not a comment. A / might start a regular expression or might be division. An apostrophe inside a double-quoted string is just an apostrophe.
This tool scans character by character, tracking whether it is inside a string, a template literal or a comment, and only removes what is genuinely removable. String and template contents are set aside during whitespace collapsing and restored afterwards, so the spaces inside your messages survive exactly as written.
What it removes
Comments, both // line comments and /* */ block comments. Note that this includes licence headers, which some libraries require you to keep - check before minifying third-party code.
Whitespace: indentation, blank lines, and the spaces around operators and punctuation.
What it does not touch: your variable names, your function names, your structure, or your semicolons. Automatic semicolon insertion has caused enough grief over the years that removing them is not a risk worth taking.