← DevHelpers|JavaScript Minifier

JavaScript Minifier — Parse, Minify & Download

Minify JavaScript with Terser in your browser. Parse errors are reported, quoted URLs and regular expressions are handled as JavaScript syntax, and the result is available to copy or download.

Parses JavaScript before compacting it. URLs, strings and regular expressions keep their meaning. Variable names and code behavior are not intentionally changed.

Processing stays in your browser. Open a text file up to 2 MB or paste a snippet.

Choose ES module for import, export or top-level await.

Editing the input or options clears the previous result.

Parse JavaScript before minifying it

Terser parses the source and prints compact JavaScript instead of removing anything that resembles a comment. Variable renaming and compression transformations are disabled. Your code is processed as text and is not executed by the tool. Syntax errors stop processing and clear old output.

Check a real script before release

Use Script mode for ordinary scripts or choose ES module for import, export or top-level await. Keep license notices when required and compare original/output byte counts. Minification does not replace application tests, dependency bundling or tree shaking. Review the result in its intended environment.

Frequently asked questions

Does this handle URLs inside strings?⌄

Yes. Strings and regular expressions are parsed as JavaScript rather than mistaken for comments. The example includes a quoted HTTPS URL.

Does the tool execute my script?⌄

No. A browser worker parses and minifies the source; it does not run the submitted JavaScript.

Can I download the result?⌄

Yes. After a successful run, copy the output or download a .js file.

Related tools & guides