UglifyJS
UglifyJS is a JavaScript toolkit for parsing, minifying, compressing, and beautifying code.
What UglifyJS is
UglifyJS is a JavaScript toolkit for parsing, minifying, compressing, and beautifying code. Developers can install it from npm for command-line or programmatic use. Its command-line interface accepts multiple input files and can read standard input when no file is specified; its configurable minify() API can return minified code, warnings, or errors. The toolkit can generate source maps and combine mappings from compiled JavaScript to original source files. It includes AST utilities, accepts SpiderMonkey AST input, and can use Acorn as an optional parser. UglifyJS supports JavaScript and most ECMAScript features, while its documentation recommends transpiling more exotic syntax with tools such as Babel first. Compatibility options are available for projects needing behavior beyond the defaults. The project is free under a BSD license and is available for API, Linux, and self-hosted use. Its documentation notes compiler assumptions and warns that some transformations can change behavior in particular cases, so developers should account for that when incorporating it into build workflows or applications.
Good
- Free and released under a BSD license
- CLI accepts multiple files or standard input
- Can generate and compose source maps
- Includes AST utilities and optional Acorn parsing
Watch out
- Exotic syntax may need transpilation first
- Some transformations can alter behavior
- Compatibility options may be needed beyond defaults
Who it suits
It suits developers who need JavaScript parsing and optimization in command-line workflows or applications. Its API and CLI offer distinct ways to use the toolkit.
Verdict
UglifyJS provides command-line and programmatic tools for JavaScript processing, including source map support. Review its syntax guidance and transformation caveats before adding it to a workflow.
Plans and prices
From UglifyJS's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| UglifyJS | Free | BSD-licensed software · install via npm |
The facts
Each one read from UglifyJS's own pages, with the date it was checked.
What it does
- API
- The API provides a configurable minify() function that can process JavaScript and return minified code, warnings or errors.checked 4 Oct 2026
- AST tools
- The toolkit includes its own AST utilities and can import SpiderMonkey AST input; Acorn can be used for parsing.checked 4 Oct 2026
- CLI
- The command-line tool accepts multiple input files and reads from standard input when no input file is specified.checked 4 Oct 2026
- Compatibility limit
- The project says it does not try to be Internet Explorer, Chrome/Node.js V8, or Safari/WebKit proof by default; corresponding compatibility options are available.checked 4 Oct 2026
- Install
- The project documents installing UglifyJS from npm for command-line or programmatic use.checked 4 Oct 2026
- Integration
- The README documents npm and Node.js usage and describes using Acorn as an optional parser.checked 4 Oct 2026
- Intended users
- The documented command-line and programmatic interfaces support developers using UglifyJS in build workflows or applications.checked 4 Oct 2026
- Language support
- UglifyJS supports JavaScript and most ECMAScript features, and the README recommends transpiling more exotic syntax with tools such as Babel first.checked 4 Oct 2026
- License
- UglifyJS is released under a BSD license.checked 4 Oct 2026
- Optimization caveat
- The README documents compiler assumptions and warns that some transformations can alter behavior in particular cases.checked 4 Oct 2026
- Purpose
- UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit.checked 4 Oct 2026
- Security
- The repository has a Security tab, but the opened security page does not state a security policy or compliance certification.checked 4 Oct 2026
- Source maps
- UglifyJS can generate source maps and compose mappings from compiled JavaScript back to original source files.checked 4 Oct 2026




