Repolode
babel

babel/babel

A JavaScript compiler that transforms next-generation JS syntax into code that runs in your target environments.

Stars
44,044
Forks
5,953
Open issues
815
Last commit
1 hour ago

What is it?

Babel is a compiler for JavaScript. It lets developers write code using the latest language features and then converts that code into an older version of JavaScript when the target environments do not support those features natively. The intro example shows the nullish coalescing operator (??) being rewritten into an equivalent expression using a null check.

Babel works by parsing source code into an AST, applying plugins that transform it, and generating output code. Its behavior is configured through presets and plugins, and it is distributed as a set of npm packages under the @babel scope, with @babel/core as the main entry point. An online REPL lets you see input and output side by side.

The project is a community-maintained monorepo maintained by a group of volunteers, and it is widely used across the JavaScript ecosystem.

Key features

  • 01Transforms modern JavaScript syntax into older versions for target environments.
  • 02Parses code into an AST and applies plugins to transform it.
  • 03Configurable through presets and plugins.
  • 04Distributed as modular npm packages under the @babel scope.
  • 05Includes an online REPL to compare input and output.

Use cases

  • Compiling ES2015+ code so it runs in older browsers or Node.js versions.
  • Building a custom JavaScript transform through Babel plugins.
  • Experimenting with syntax transformations in the online REPL.

Quick start

  1. 1

    Try it instantly in the online REPL at babel.dev

  2. 2

    Read the docs at babeljs.io to set up Babel in your project

Topics

FAQ

What is babel?
A JavaScript compiler that transforms next-generation JS syntax into code that runs in your target environments. Babel is a compiler for JavaScript. It lets developers write code using the latest language features and then converts that code into an older version of JavaScript when the target environments do not support those features natively. The intro example shows the nullish coalescing operator (??) being rewritten into an equivalent expression using a null check.
Is babel free to use? What license does it have?
babel is open source under the MIT license. Check the license terms before using it in commercial products.
Is babel still maintained?
Actively maintained. The last commit to babel was on Oct 22, 2026.
What can I use babel for?
Compiling ES2015+ code so it runs in older browsers or Node.js versions. Building a custom JavaScript transform through Babel plugins. Experimenting with syntax transformations in the online REPL.
How do I install babel?
Try it instantly in the online REPL at babel.dev Read the docs at babeljs.io to set up Babel in your project
Where can I get babel?
The source code and installation instructions are on GitHub: https://github.com/babel/babel

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects