ATTN: I've moved to a new server recently and haven't had time to get this back up yet.. For now I highly recommend Arthur Blakes Compressorator, which totally kills any other online js compressor suite..
Google Code Closure Compiler
ShrinkSafe Dojo Compressor
Being based on a real parse stream, the Dojo compressor can get a better idea for the context of a token (variable name, etc.) than the regular-expression based tools. This allows us to achieve the over-riding goal of a compressor that would be acceptable to the Dojo project: it must never mangle a public API.
But not if your size-reduction tool breaks things. There are, of course, many increments available for the "compression" process. Potential choices available to a tool author include:
- removing comments
- collapsing line-beginning whitespace
- removing line-ending whitespace
- collapsing multiple blank lines
- removing all new-line characters
- removing whitespace around operators
- removing whitespace near/around curly braces
- replacing symbols with shorter names (this is how most "obfuscation" is done)