Google Closure Compiler vs Oxc
Google Closure Compiler
developers.google.comOxc
oxc.rsSide by side
| Figure | Google Closure Compiler | Oxc |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | — |
| Plans published | 1 | 1 |
| Spec score · JavaScript Build Tools | 8.1 (#6) | 7.9 (#8) |
| Integrations | The repository documents a NodeJS API and use through Maven, NPM, Bazel, and command-line Java. | Transformer integrations listed by the project include unplugin-oxc, unplugin-isolated-decl, and oxc-webpack-loader. |
Plans
In their own words
Google Closure Compiler
Google Closure Compiler optimizes JavaScript by analyzing code, removing dead code, and rewriting and minimizing what remains. It can also check syntax, references, and types, and warn about illegal JavaScript, risky operations, and common pitfalls. Google says smaller output files can help applications load faster and reduce bandwidth needs. Compilation options include WHITESPACE_ONLY, SIMPLE, and ADVANCED; the repository README also lists BUNDLE. ADVANCED applies aggressive transformations and symbol renaming to improve compression, so preserving program behavior requires care. The project is available as a command-line Java application, a library used through Bazel, and an NPM package. Released JARs are distributed through Maven. The repository documents Maven, NPM, Bazel, command-line Java, and a NodeJS API. Building the compiler requires Java 21 or later, NodeJS, Git, and Bazelisk. Its input restrictions include use of goog.module() and goog.require(), and ES6 import/export support is not actively maintained. The NPM packages are built and distributed by an open source contributor, not Google. The compiler is free.
Oxc
Oxc is a free collection of JavaScript tools written in Rust, available for Linux, macOS and Windows. Its toolchain includes a linter, formatter, parser, transformer, resolver, minifier and TypeScript runner. Oxlint checks JavaScript and TypeScript, including JSX, TSX and script blocks in Vue, Svelte and Astro files. It includes more than 870 rules across areas such as TypeScript, React, Jest, Vitest, imports, Unicorn and accessibility. Type-aware linting uses tsgo, a native Go port of the TypeScript compiler. Oxfmt follows a Prettier-compatible workflow and can sort imports, Tailwind CSS classes and package.json fields; it formats JavaScript, TypeScript, JSON, YAML, TOML, HTML, Vue, Svelte, CSS, Markdown, GraphQL and other formats. The transformer handles TypeScript and JSX, syntax lowering from ES2026 to ES2015, React Refresh, plugins and isolated declaration output. An experimental runner executes TypeScript and JSX without a separate build step, with ESM, CommonJS, source map and tsconfig.json support. It strips types but does not type-check programs, and its APIs and behavior may change between releases.