Closure Compiler is an open source tool from Google that compiles JavaScript code to make it more compact and efficient. It parses JS, removes dead code, rewrites code, and minimizes file size. It can be used via a web interface, REST API, or Java application. It offers three compilation levels - whitespace only, simple optimizations, and advanced optimizations - that provide increasing levels of code compression and optimization by renaming variables, inlining functions, and other transformations.