View Full Version : js obfuscator - what to choose?

08-04-2008, 09:14 PM
Hey all,

I've developed a nice javascript code library and wish to sell it.
I don't wish competitors to be able to cut and paste pieces from it into
their code. The only way to protect it somehow is to rename variables,
remove comments and so on - i.e. to apply a javascript obfuscator to it.
Please recommend me a javascript obfuscator, and tell me your experience
with it.
In google I've found javascript obfuscator (http://www.stunnix.com/prod/jo/)from Stunnix. It looks good to me, but I didn't try it though.

rnd me
08-05-2008, 04:36 AM
there's so many free ones though. what does your library do special?
not saying its not worth it, just that i'm dubious.

i would also consider changing your outlook on this. you code can be easily stolen despite any attempt to conceal it. to obfuscate will only slow down a hacker, not stop it. you don't need to know all the inner vars as long as you rename the functions you need to use.

your best protection for javascript is legal, not technical. copyright/ license your code, and sue thieves.

consider also how microsoft became #1 by NOT cracking down on piracy. better someone use you script for free (increasing its popularity) than not at all. serving a jslib is much cheaper than advertising...

i would offer a full white-spaced and commented version, not the other way around.

08-05-2008, 05:45 PM
It's not quite clear what you're doing here.

There's conceivable benefit in using a JS obfuscator on your particular running application -- some web site you have that you believe is so fancy that competitors will want to steal the code. In that case, the obfuscator will at least slow them down, and maybe if it's a good one it won't do it at a tremendous cost in the speed of the code and therefore the usability of the site. As has been said, don't imagine for an instant that an obfuscator will stop anyone who actually cares about getting your code.

Using a JS obfuscator on a library that you want other people to obtain and use, that you're offering for public consumption, is absolutely senseless. Obfuscating the code will guarantee that no serious web developer will ever use it.

03-08-2010, 11:58 AM
You should know your reasons :p
Try www.jscrambler.com

03-10-2010, 07:54 PM

It offers anti-debugging techniques e.g. checksum verification. By comparing a checksum created at obfuscation with one created at execution time it will stop the execution of your code if an change has been detected.