Use this JavaScript Minifier to strip whitespace, newlines, and comments from your JS code.
Minifying JavaScript removes comments, long variable names (if mangled), and unnecessary spaces. This drastically reduces the file size of your scripts, allowing browsers to download and execute them much faster.
You can use our JavaScript Formatter tool to easily restore spacing and indentation to minified code. However, it cannot restore original variable names if they were shortened (mangled).