Your files stay on your device JavaScript minifier Paste JavaScript and get smaller output: comments stripped and whitespace collapsed by a literal-aware scanner that preserves strings, template literals, regex literals, and newlines where semicolon insertion changes meaning, with no renaming or reordering. Paste some JavaScript to shrink it. This tool strips comments and collapses whitespace. It never renames a variable, reorders a statement, or rewrites an expression, so it shrinks less than a real minifier like Terser would. Keep mode preserves every source line break, which is what automatic semicolon insertion is defined over; one-line mode joins the output and inserts an explicit semicolon where a return, throw, break, continue, yield, or a newline postfix relied on that break. A clean run is not a claim that the source parses. Options More regex & cron tools - JSON formatter (/json/formatter) - JSON string escape (/json/escape) - Regex tester (/dev/regex-tester) All regex & cron tools (/dev) Was this tool useful? YesNo Canonical HTML: https://nutter.tools/dev/javascript-minify Markdown version: https://nutter.tools/dev/javascript-minify.md Plain-text version: https://nutter.tools/dev/javascript-minify.txt Agent index: https://nutter.tools/llms.txt