Closure Compiler is a production-grade JavaScript optimizer and checker that parses JS, analyzes it, removes dead code, rewrites and minifies what remains, and emits faster, smaller bundles. Beyond minification, it performs advanced optimizations such as inlining, property collapsing, type-guided rewrites, and cross-module motion, often yielding substantial load-time wins. It includes a strong static checker that validates syntax, variable references, and type annotations (Closure types or JSDoc), catching bugs early and enabling aggressive transformations safely. The ecosystem provides a Java implementation, npm/JS builds, and documentation for integrating in modern toolchains. Closure Compiler has been used extensively at scale within Google and by the broader community, proving its robustness on very large codebases. Companion repositories track npm packaging and a JS-only variant for environments where running Java is undesirable.

Features

  • Advanced whole-program optimizations beyond minification
  • Strong static checks with JSDoc-based typing
  • Dead-code elimination, inlining, and property collapsing
  • Cross-module code motion and code splitting support
  • Multiple distributions including Java and JS-only builds
  • Battle-tested on very large, production codebases

Project Samples

Project Activity

See All Activity >

Categories

Compilers

License

Apache License V2.0

Follow Google Closure Compiler

Google Closure Compiler Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Google Closure Compiler!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

JavaScript

Related Categories

JavaScript Compilers

Registered

2025-10-09