A good on-line JS obsfucator for minifying purposes only [updated]

I’ve searched the web for a Javascipt obsfucator for my specific needs — actually a minifier and obsfucator that will minify a code (pretty like BrainJar do) and obsfucate all variables, function names etc. to 1-2 character length (shortest possible). I know that this could be less secure, but due to purpose (internal project), size of the code, not security, is a key here. I also need it as one-click, on-line ready tool.

Since my searches failed, I’ve asked a question on Stack Overflow, but it was closed as off-topic.

Following article is a summary of answers already given on Stack Overflow (before question was closed) plus my some other thoughts and findings.

tl;dr: Dean Edwards’ JS Packer is the tool of my choice. It produces almost unreadable Javascript code.


Here is a list of tools, I have found and tested, along with an explanation, why each of them doesn’t seems to be enough for me:

  • BrainJar’s Chrunchinator does a very good (in my opinion) minifying job, but without any code obsfucation,
  • Online JavaScript/CSS Compression, though claims to be doing obsfucation (the Minify only, no symbol obfuscation checkbox not checked) does nothing else, than just minification, sometimes even worse than BrainJar’s,
  • Free Javascript Obfuscator does both minimize + obsfucation, but more like for security purposes (variables and functions have names hard to understand instead of being obsfucated to shortest possible); it was marked on some Stack Overflow questions as being not secure enough and it also fails on some a bit more complex Javascipt code,
  • Javascript Code Encrypter and Obfuscator does a real good job, but obsfucation is oriented toward security, not minification, so resulting code, though really hard to understand, is sometimes bigger than source one.

I’ve heard about many good solutions (YUI from Yahoo, Clousure from Google), but they’re all downloadable libraries, no on-line, one-click solution.

After browsing all answers, that were given in response to my question, I have finally selected Dean Edwards’ JS Packer is the tool of my choice. It is a very simple on-line tool, yet it makes the code almost unreadable.

Someone proposed the Google Closure Compiler can be considered only for a simple pieces of Javascript code; when fed with a bit bigger code it fails completely, by either not minimizing or obsfucating anything, by producing code that doesn’t work or a code that replicates results only, not the code itself (see how Advanced mode works on example code provided by GCC itself.

Another answer told about downloadable tool, which is out of scope of my question.

Update! A year after original question (and two answers) were given, another answer was provided, talking about blimptontech.com’s solution, which was supposed to compress and combine your Javascript files. Unfortunately, this tool has quickly become unavailable and it displays 503 Service Temporarily Unavailable.

Leave a Reply