# javascript-obfuscator/javascript-obfuscator

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/javascript-obfuscator-javascript-obfuscator).**

16,129 stars · 1,734 forks · TypeScript · BSD-2-Clause

## Links

- GitHub: https://github.com/javascript-obfuscator/javascript-obfuscator
- Homepage: https://obfuscator.io
- awesome-repositories: https://awesome-repositories.com/repository/javascript-obfuscator-javascript-obfuscator.md

## Description

This project is a JavaScript code protection tool designed to transform source code into a version that is difficult for humans to read. Its primary purpose is to protect intellectual property and prevent reverse engineering by altering the original program logic.

The tool employs several advanced techniques to hinder analysis, including control flow flattening and the injection of dead code. It can compile functions into custom bytecode executed by an embedded virtual machine and encrypt string literals to prevent static analysis of text.

Additional capabilities include anti-debugging mechanisms that freeze developer tools and self-defending code that crashes if the source is beautified or modified. The tool also provides domain-locking to restrict execution to specific authorized environments and supports the synchronization of identifiers across multiple files using a shared cache.

Users can manage these processes through a command line interface, utilize pre-defined security presets, and generate source maps for production debugging.

## Tags

### Security & Cryptography

- [JavaScript Obfuscators](https://awesome-repositories.com/f/security-cryptography/payload-obfuscation/executable-obfuscators/javascript-obfuscators.md) — Provides a CLI to automate the transformation of JavaScript source code using various security presets. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CLAUDE.md))
- [Code Obfuscators](https://awesome-repositories.com/f/security-cryptography/security/utilities/security-hardening-and-protection/code-obfuscators.md) — Provides a professional tool to transform source code into a complex, unreadable format to prevent reverse engineering. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator#readme))
- [Anti-Debugging Implementations](https://awesome-repositories.com/f/security-cryptography/anti-analysis-removal/anti-debugging-implementations.md) — Implements logic to detect attached debuggers and trigger crashes to prevent code analysis.
- [String Literal Obfuscation](https://awesome-repositories.com/f/security-cryptography/code-obfuscation-protections/string-literal-obfuscation.md) — Extracts strings into a special array and encodes them to prevent static analysis of text. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))
- [Code Tamper Protections](https://awesome-repositories.com/f/security-cryptography/code-tamper-protections.md) — Inject defenses that freeze developer tools and break execution if the source is beautified or hooked. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator#readme))
- [Debugger Detection](https://awesome-repositories.com/f/security-cryptography/debugger-detection.md) — Injects protections that detect attached debuggers and freeze browser developer tools. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))
- [Reverse Engineering Prevention](https://awesome-repositories.com/f/security-cryptography/reverse-engineering-prevention.md) — Applies techniques like control flow flattening and dead code injection to hinder the analysis of program logic.
- [Self-Defending Code](https://awesome-repositories.com/f/security-cryptography/self-defending-code.md) — Inserts mechanisms that crash the application if the source code is beautified or modified. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))
- [Source Code Protection](https://awesome-repositories.com/f/security-cryptography/source-code-protection.md) — Transforms JavaScript source code into a version that is difficult for humans to read to protect intellectual property.
- [Self-Defending Code](https://awesome-repositories.com/f/security-cryptography/source-code-protection/self-defending-code.md) — Injects self-defending mechanisms that cause the code to crash if the source is formatted or modified. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CHANGELOG.md))
- [Domain Access Restrictions](https://awesome-repositories.com/f/security-cryptography/domain-access-restrictions.md) — Restricts code execution to authorized hostnames or domains to prevent unauthorized usage. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CHANGELOG.md))
- [Domain Locking](https://awesome-repositories.com/f/security-cryptography/domain-locking.md) — Injects runtime checks that validate the current window location against authorized domains.
- [SDK License Enforcers](https://awesome-repositories.com/f/security-cryptography/identity-access-management/access-control/business-constraint-enforcement/sdk-license-enforcers.md) — Restricts the execution of JavaScript to specific domains or environments to prevent unauthorized usage.
- [Numeric Obfuscations](https://awesome-repositories.com/f/security-cryptography/numeric-obfuscations.md) — Replace static numeric values with complex mathematical expressions that evaluate to the original number. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))
- [Batch Obfuscation](https://awesome-repositories.com/f/security-cryptography/security/utilities/security-hardening-and-protection/code-obfuscators/semantic-naming-obfuscation/batch-obfuscation.md) — Processes multiple source files simultaneously while maintaining consistent identifier mapping through a shared cache. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CLAUDE.md))

### Development Tools & Productivity

- [JavaScript AST Transformations](https://awesome-repositories.com/f/development-tools-productivity/ast-transformation-tools/standardized-ast-transformation/javascript-ast-transformations.md) — Performs structural modifications of JavaScript source code using abstract syntax tree transformations.
- [Dead Code Injection](https://awesome-repositories.com/f/development-tools-productivity/dead-code-injection.md) — Inserts non-functional code segments into the AST to confuse static analysis tools.
- [Identifier Mangling](https://awesome-repositories.com/f/development-tools-productivity/identifier-to-template-mappings/identifier-mangling.md) — Replaces variable and function names with mangled or hexadecimal identifiers to hide original logic. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))
- [String Literal Obfuscation](https://awesome-repositories.com/f/development-tools-productivity/string-literal-handling/string-literal-obfuscation.md) — Hides constant string values by replacing them with runtime-resolved decryption expressions.
- [File Management CLI Tools](https://awesome-repositories.com/f/development-tools-productivity/cli-automation-tools/file-management-cli-tools.md) — Provides CLI tools for recursively traversing and processing files and directories for obfuscation. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator#readme))
- [Cross-File Identifier Synchronization](https://awesome-repositories.com/f/development-tools-productivity/identifier-generators/identifier-prefixes/cross-file-identifier-synchronization.md) — Uses a naming cache and unique prefixes to ensure consistent identifier replacement across multiple files. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator#readme))
- [Exclusion Lists](https://awesome-repositories.com/f/development-tools-productivity/identifier-generators/uri-resource-identifiers/resource-identifier-obfuscation/exclusion-lists.md) — Exclude chosen variable or function names from obfuscation to maintain compatibility with external APIs. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CHANGELOG.md))

### Programming Languages & Runtimes

- [Bytecode Virtual Machines](https://awesome-repositories.com/f/programming-languages-runtimes/bytecode-virtual-machines.md) — Compiles functions into custom bytecode executed by an embedded virtual machine to hide logic.
- [Control Flow Flattening](https://awesome-repositories.com/f/programming-languages-runtimes/control-flow-flattening.md) — Restructures program execution paths into a central switch statement to obscure original logic.

### Operating Systems & Systems Programming

- [HTML](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/shells-scripting/powershell/script-obfuscation/html.md) — Obfuscates JavaScript inside HTML script tags while preserving the surrounding HTML structure. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator#readme))

### Software Engineering & Architecture

- [Identifier Mapping Caches](https://awesome-repositories.com/f/software-engineering-architecture/identifier-mapping-caches.md) — Maintains a mapping of original names to obfuscated versions across multiple files to ensure consistency.

### Web Development

- [Batch Source Processing](https://awesome-repositories.com/f/web-development/batch-processing/batch-source-processing.md) — Processes multiple source files simultaneously while maintaining consistent identifier mapping through a shared cache. ([source](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md))

### Part of an Awesome List

- [Code Optimization](https://awesome-repositories.com/f/awesome-lists/devtools/code-optimization.md) — Advanced obfuscation for JavaScript and Node.js.
