Davén.se

Christian Davén's personal home page.

Open Source Javascript Obfuscator

This is Shane Ng's GPL-licenced obfuscator. It was originally published on his web site, but it seems to be unavailable nowadays. I copied it from Google's cache and put it here so that it wouldn't disappear.

You input your Javascript into this program, and it will make it completely incomprehensible. Function and variable names are changed, spaces and line breaks removed, strings made into mixed hexadecimal and Unicode "garbage" etc. This can be used to protect your intellectual property -- but remember that the script still works, and can be copied verbatim to another web site.

The code is 500 something lines of Java, and compiles with 1.4 compilers. It is simple to use -- just run the program and it will tell you how it works.

Download the source code (.java file) and compile it yourself, or download the cross-platform binary code (.class files).

Some Things to Keep in Mind

The function calls from your html files are untouched, so you need to change those manually. The obfuscated functions are in the same order as those in the original file, so count the functions to find the one you're looking for. If you use function calls within "" (like for setTimeout), they will probably be obfuscated and make your script stop working. Change manually.


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser