Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Babel
Babel

5.2K
3.4K
+ 1
384
Closure Compiler
Closure Compiler

23
34
+ 1
5
Add tool

Babel vs Closure Compiler: What are the differences?

Developers describe Babel as "Use next generation JavaScript, today". Babel will turn your ES6+ code into ES5 friendly code, so you can start using it right now without waiting for browser support. On the other hand, Closure Compiler is detailed as "A JavaScript checker and optimizer". The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.

Babel belongs to "JavaScript Compilers" category of the tech stack, while Closure Compiler can be primarily classified under "JavaScript Optimizers".

Some of the features offered by Babel are:

  • Array comprehensions
  • Arrow functions
  • Async functions

On the other hand, Closure Compiler provides the following key features:

  • parses JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left
  • checks syntax, variable references, and types, and warns about common JavaScript pitfalls
  • transpiling some ECMAScript 6 code to ECMAScript 3

Babel and Closure Compiler are both open source tools. Babel with 33.5K GitHub stars and 3.57K forks on GitHub appears to be more popular than Closure Compiler with 4.99K GitHub stars and 918 GitHub forks.

What is Babel?

Babel will turn your ES6+ code into ES5 friendly code, so you can start using it right now without waiting for browser support.

What is Closure Compiler?

The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose Babel?
Why do developers choose Closure Compiler?

Sign up to add, upvote and see more prosMake informed product decisions

    Be the first to leave a con
      Be the first to leave a con
      What companies use Babel?
      What companies use Closure Compiler?

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with Babel?
      What tools integrate with Closure Compiler?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      What are some alternatives to Babel and Closure Compiler?
      Webpack
      A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders" modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
      TypeScript
      TypeScript is a language for application-scale JavaScript development. It's a typed superset of JavaScript that compiles to plain JavaScript.
      CoffeeScript
      It adds syntactic sugar inspired by Ruby, Python and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and de-structuring assignment.
      ESLint
      A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
      Modernizr
      It’s a collection of superfast tests or detects as we like to call them which run as your web page loads, then you can use the results to tailor the experience to the user. It tells you what HTML, CSS and JavaScript features the user’s browser has to offer.
      See all alternatives
      Decisions about Babel and Closure Compiler
      No stack decisions found
      Interest over time
      Reviews of Babel and Closure Compiler
      No reviews found
      How developers use Babel and Closure Compiler
      Avatar of Cloudcraft
      Cloudcraft uses BabelBabel

      Babel is awesome! 100% of the code for Cloudcraft.co is transpiled from ES2015 (even some ES7 extensions, like decorators and class properties!), using Gulp+Browserify for the frontend and on-the-fly translation in the Node.js backend. Babel allows us to use all the features of future JS, today, giving us a efficient and clean codebase. Overall, it has been an exceptionally smooth adoption, everything Just Works(tm), including debugging with source maps, etc.

      Avatar of Volkan Özçelik
      Volkan Özçelik uses BabelBabel

      When you are using modern (or sometimes experimental) features of the language, you’ll eventually have to transpile them so that your app works in a wide spectrum of user agents.

      Babel is the transpilation tool of my choice.

      Avatar of Kent Steiner
      Kent Steiner uses BabelBabel

      I use babel so I can confidently move forward using ES6 and other more modern Javascript concepts and libraries in development and still maintain compatibility with the current state of web browsers and other viewports.

      Avatar of Mick Dekkers
      Mick Dekkers uses BabelBabel

      Babel transpiles ES6/ES2015+ code to a format older browsers (*cough* IE *cough*) can understand. This allows developers to write modern JS code while remaining compatible with older systems.

      Avatar of Marc3842h
      Marc3842h uses BabelBabel

      Babel is used in Kuro (https://github.com/Marc3842h/kuro).

      Kuro is the browser facing portion of shiro. We use Babel as a easy to use build system for our frontend stack.

      How much does Babel cost?
      How much does Closure Compiler cost?
      Pricing unavailable
      Pricing unavailable
      News about Closure Compiler
      More news