• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
17 Comments Favorite Copy Link Share

Javascript Obfuscator Online


Code obfuscation is achieved using browser capabilities, and your code will not be uploaded to the cloud.

Source Code

Result

Source Map

Obscure Result
File Size Status Operation
Javascript Obfuscator Online-summary

JavaScript obfuscation and encryption tool online supports online obfuscation and encryption of JavaScript code. Obfuscation supports low obfuscation high performance, medium obfuscation optimal performance, high obfuscation low performance modes. You can also control the detailed process of obfuscation by customizing parameters.

Javascript Obfuscator Online-instructions

JavaScript (JS) code obfuscation and encryption online tool is a free and powerful JS obfuscation tool. It supports variable renaming, string encryption, dead code injection, control flow and code conversion. This tool supports es3, es5, es2015, es2016, es2017, es2018, es2019 language standards, and partially supports es2020 language standards.

  1. Mode : Predefined four encryption modes: low obfuscation, medium obfuscation, high obfuscation and custom parameters. Different obfuscation degree and parameters have different influence on performance.
  2. File : Choose single file obfuscated or batch file obfuscated.
  3. Source Map : Whether to generate Source Map files.
  4. Open : Open .js file or .zip file. Supported js file character encodings isUTF-8.
  5. In the custom parameters, you can enter the user-defined JSON parameters to control the underlying details of obfuscation. Please confirm that the correct configuration parameter format is maintained, and test the obfuscated code to ensure work correctly.
    See the following table for some core parameters,Complete parameter listDocumentation.
  6. Typical usage of custom parameters:
    By setting domainLock and domainLockRedirectUrl parameters, encrypted JS files are prohibited from running in unauthorized domain name websites, so as to prevent others from copying your code.
    By setting debugProtection related parameters, it is forbidden for others to debug your JS code in the developer debugging tool mode.
    Setting the selfDefending parameter will make the obfuscated code unavailable after beautification, thus increasing the difficulty of understanding the obfuscated code.
Core Parameter List
Name Type Default Value Description
compact boolean true Compact code output on one line.
controlFlowFlattening boolean false Enables code control flow flattening. Control flow flattening is a structure transformation of the source code that hinders program comprehension.
controlFlowFlatteningThreshold number 0.75 Min: 0 Max: 1.The probability that the controlFlowFlattening transformation will be applied to any given node.
deadCodeInjection boolean false With this option, random blocks of dead code will be added to the obfuscated code.
deadCodeInjectionThreshold number 0.4 Min: 0 Max: 1. Allows to set percentage of nodes that will affected by deadCodeInjection.
debugProtection boolean false This option makes it almost impossible to use the debugger function of the Developer Tools (both on WebKit-based and Mozilla Firefox).
debugProtectionInterval number 0 If set, an interval in milliseconds is used to force the debug mode on the Console tab, making it harder to use other features of the Developer Tools. Works if debugProtection is enabled. Recommended value is between 2000 and 4000 milliseconds.
disableConsoleOutput boolean false Disables the use of console.log, console.info, console.error, console.warn, console.debug, console.exception and console.trace by replacing them with empty functions. This makes the use of the debugger harder.
domainLock string[] [] Allows to run the obfuscated source code only on specific domains and/or sub-domains. This makes really hard for someone to just copy and paste your source code and run it elsewhere. If the source code isn't run on the domains specified by this option, the browser will be redirected to a passed to the domainLockRedirectUrl option URL.
domainLockRedirectUrl string about:blank Allows the browser to be redirected to a passed URL if the source code isn't run on the domains specified by domainLock.
renameGlobals boolean false Enables obfuscation of global variable and function names with declaration.This option can break your code. Enable it only if you know what it does!
renameProperties boolean false Enables renaming of property names. All built-in DOM properties and properties in core JavaScript classes will be ignored.This option MAY break your code. Enable it only if you know what it does!
selfDefending boolean false This option makes the output code resilient against formatting and variable renaming. If one tries to use a JavaScript beautifier on the obfuscated code, the code won't work anymore, making it harder to understand and modify it. This option forcibly sets compact value to true.
target string browser Allows to set target environment for obfuscated code.Available values:browser,browser-no-eval,node. Currently output code for browser and node targets is identical, but some browser-specific options are not allowed to use with node target. Output code for browser-no-eval target is not using eval.
unicodeEscapeSequence boolean false Allows to enable/disable string conversion to unicode escape sequence. Unicode escape sequence increases code size greatly and strings easily can be reverted to their original view. Recommended to enable this option only for small source code.