Overview
Babel is a JavaScript compiler. Its main job is to take code written with recent JavaScript syntax and rewrite it into an older form that browsers and runtimes without that syntax can still run. Developers use it so they can write modern code without waiting for every target environment to catch up.
Everything Babel does is done by plugins, and groups of plugins are bundled as presets. Official presets handle modern JavaScript, React's JSX, and stripping Flow or TypeScript type annotations. Missing built-in features can be filled in with third-party polyfills such as core-js. Babel also produces source maps so you can debug the original code, and it can be used for automated code rewrites (codemods). You can write your own plugins too.
One thing to know is that Babel removes TypeScript types but does not check them, so type checking still needs the TypeScript compiler. Babel is released under the MIT licence, is maintained by a small group of volunteers, and is funded by donations through Open Collective and GitHub Sponsors. The site has an online "Try it out" page for experimenting in the browser.
Categories
Features
- Converts modern JavaScript syntax into code older environments can run
- Plugin system, with presets that bundle sets of plugins
- JSX support through the React preset
- Strips TypeScript and Flow type annotations
- Works with third-party polyfills such as core-js
- Source map output for debugging compiled code
- Can be used for codemods and custom source transformations
- Online "Try it out" page in the browser
Privacy
See the official privacy policy. Babel is installed and run on your own machine; no account is needed.
Pros & Cons
Pros
- Free and open source under the MIT licence
- Very flexible: almost every behaviour is a plugin you can add, remove or write
- Lets teams use new language features early
- No account needed for the tool or the online playground
Cons
- Does not type-check TypeScript, it only removes the types
- Configuration of presets, plugins and targets can be confusing at first
- Maintained by a handful of volunteers who depend on donations
- Adds a build step to a project
Community Reviews (0)
No written reviews yet — be the first to rate this tool.
Similar Tools
-
JavaScript · javascript.info
Teaches JavaScript from the basics to advanced topics for free.
Free No Signup Web -
JavaScript · MDN Web Docs
Documents the JavaScript language and web APIs.
Free No Signup Web -
Detects errors and potential problems in JavaScript code.
Open Source No Signup Web