views:

181

answers:

6

hello,

thanks for your attention and precious time.

Please mention some free javascrpt obfuscator software that can compress, obfuscates and encode javascript for protection. I serached but could found web based only and those which are free and desktop are not good. Please guide and help me.

thanks

+1  A: 

Minification "compresses" code.

Packing "compresses" and "obfuscates" code.

The most popular packer I believe to be: http://dean.edwards.name/packer/

However Google Closure one of the highest rated minifiers can also do packing with additional options: http://code.google.com/closure/compiler/docs/api-tutorial3.html#enable

balupton
thanks balupton,Packer is good but it is web based, is there any tool desktop based ?thanks
haansi
Google Closure is a java file you can download and run via the command line. It's my preferred method for minification (as well as jQuery's) and as stated it can do additional things like packing by passing some additional command line arguments.
balupton
+5  A: 

Obfuscation: Don't do it.

No matter how hard you try to obfuscate JS, it's easy to de-obfuscate it. There are many plugins available for this purpose. For example, there is Javascript Deobfuscator for Firefox.

Do minify though.

It will save you and your users some bandwidth, improve load times and everybody's happy.

Google Closure Compiler
MinifyJS
YUI Compressor
many more...

NullUserException
thanks NullUserException
haansi
+1  A: 

Hey there is no such thing.

Javascript needs to be interpreted by the browser, and hence has to be readable by the browser... and thus cannot be obfuscated. The ones you find on google are as good as it gets. They can make the javascript slightly hard to read by hand, but on the other hand it's pretty easy to de-obfuscate them.

There is one option if you want to do something to protect your code. You can move your code to the serverside using a server side javascript solution, such as node.js. This will probably make your app overall more complicated but might be worth it if you are really serious about protecting your code.

Mark
+1  A: 

Here's an easy web based one:

http://www.javascriptobfuscator.com/default.aspx

Also, remember that if an attacker is determined enough, they will be able to put together the original code, obfuscating just deters casual attackers and just makes it harder for the more experienced ones.

Parker
+1  A: 

YUI Compressor is generally considered the best option for minifying JavaScript. But don't imagine anything will protect your code if anyone wants to steal it — that's a fool's errand and no professional will waste his time that way.

Chuck
A: 

I would like to suggest another tool to minify / compress /obfuscate javascript: http://jscrambler.com

Currently it is web only but an API is coming that will allow for remote call.

I have found a list of known javascript obfucators here: http://www.malwareguru.org/mediawiki/index.php/Collection_of_tools_for_javascript_obfuscation_%28javascript_packers%29

rmribeiro