What kind of a tool would you recommend for JavaScript compression and/or obfuscation? A google search comes back with a lot of online tools, but I am not sure how to gauge their effectiveness/usefulness.
Is there a tool that you would recommend for this?
Thanks,
JavaScript obfuscation is a series of code transformations that turn plain, easy-to-read JS code into a modified version that is extremely hard to understand and reverse-engineer. Unlike encryption, where you must supply a password used for decryption, there's no decryption key in JavaScript obfuscation.
Tools For Code Obfuscation In Javascript You can use an online tool like: JavaScript Obfuscator. Beautifytools.
Obfuscating your code is not a good idea. It will only inconvenience legitimate users (eg. when they need to fix a bug), and do nothing to 'protect' it from people who have a (financial) incentive to reverse-engineer it. It is fundamentally impossible to prevent reverse-engineering of Javascript code.
Press F12 to open Developer Tools inside Chrome. Now switch to the Scripts tab, right-click and choose De-obfuscate source. That's it! Alternatively, go to jsbeautifier.org and copy-paste the cryptic JavaScript /HTML code that you are trying to understand.
There are many tools that transform Javascript in something different. I currently classify these tools in the following objectives:
My order has some meaning behind it. Because generally the higher level includes all be features below.
So a good Javascript Obfuscator is able to minify, compress, optimize...
Many tools do some of these levels well individually. They can be combined making them more effective but my experience has shown that combining several such tools make it a nightmare to try and pin point a problem.
My suggestion for a good overall Javascript obfuscator would be to use jscrambler.com
For optimization and minification google closure (has sugested by aepheus) is a excellent solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With