Key Features
JS-Confuser provides the following features:- Comment removal / minification
- Variable renaming
- Control Flow obfuscation
- String concealing
- Function obfuscation
- Locks (domainLock, date)
- Detect changes to source code
Basic examples
Comment removal / minification
This example hasCompact enabled. This simply removes comments and whitespace from your code.
Comment removal / minification
Rename Variables
This example hasRename Variables enabled, which changes all variable names in your code to randomized names. This is a ‘one-way’ function as the original names are permanently lost, making it a great obfuscation technique.
Rename Variables
Control Flow Obfuscation
This example hasControl Flow Flattening enabled. This obfuscation technique makes your code significantly harder to understand by altering its logical structure, however, it can severely decrease performance. Thus, it should be used sparingly.
Control Flow Obfuscation
Pros / Cons
Code obfuscation has both it’s pros and cons, so it’s important to balance it according to your app’s specific and security needs. JS-Confuser is highly configurable, allowing you to achieve the right level of protection without compromising on performance or maintainability.Pros
- Protect intellectual property
- Prevent others from stealing your code
- Prevent modding your app
- Enforce client-side license checks
Cons
- Significant performance reduction
- File size increase
- Can break your program