JS Minifier β Free Online Tool
A basic JavaScript minifier that removes comments and collapses extra whitespace.
βΉοΈ This is a basic minifier. It strips comments and collapses blank lines and extra spaces. It does not rename variables or parse strings, so avoid using it on code that contains // or /* */ inside string literals.
About JS Minifier
The JS Minifier is a basic tool that trims your JavaScript by removing comments, collapsing extra spaces and tabs, and deleting blank lines. It is a quick way to slim down small scripts and snippets before pasting them into a page or a build.
Because it relies on simple pattern matching rather than a full parser, it is fast and runs entirely in your browser, keeping your code private. For complex production code that needs safe variable renaming, pair it with a full build-step minifier.
How to Use JS Minifier
- Paste your JavaScript into the input box.
- Click 'Minify' to remove comments and collapse whitespace.
- Read the saved-character summary above the output.
- Click 'Copy Result' to grab the minified script.