How to unobfuscate javascript

Website Array · Tags

A lot of javascript gets packed up these days with Dean Edwards amazing Packer functionality. This is great for delivery and optimization, but hard for people to make minor adjustments or to just peak at the code to learn some new techniques. It also gets quite frustrating if you just want to tweak a bit of code you just purchased, but the original author doesn’t reply to your inquiries. So here’s a short and simple way to turn/decode “packed” javascript into plain readable javascript.
obfuscatedjavascript

  1. Bookmark the following link so you can run it from any site: Enable Decode Button
  2. Now goto the packer site and click the bookmark you just created. The “copy” textarea should now be writeable and the decode button activated. Now copy in your packed and obfuscated code and hit decode.
  3. At this point you pretty much have what you need, but for better legibility head over here, paste your decoded code in and hit beautify.

After you’re done making changes it’s probably best to pack the code again, because it does have its advantages (a much smaller file size).

Happy coding!

Share:
  • Facebook
  • Twitter
  • Digg
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Reddit
  • RSS
  • email

Previous post:
Next post:

Leave a Comment

(required) (required)