YUI Compressor was the consensus best tool for minimizing, but Closure seems like it could be better.
Closure can be used in the Simple mode or the Advanced mode. Simple mode is fairly safe for most JavaScript code, as it only renames local variables in functions to get further compression.
Advanced mode is much more aggressive. It will rename keys in object literals, and inline function calls if it can determine that they return simple values with no side effects.
For example:
function Foo()
{
return "hello";
}
alert(Foo());
is translated to:
alert("hello");
And this code:
var o = {First: "Mike", Last: "Koss"};
alert(o);
is translated to:
alert({a:"Mike",b:"Koss"});
You can prevent the Advanced mode from changing key values in object literals by quoting the names like this:
{'First': "Mike", 'Last': "Koss"}
You can try out these and other examples at google's interactive Closure Compiler site.