Modular standard library for JavaScript
open sourceMITself-hostablefree
core-js is a library of polyfills for ECMAScript up to 2026, ECMAScript proposals and some cross-platform WHATWG and W3C features such as URL: promises, symbols, collections, iterators, typed arrays and more. It follows the specifications strictly and also fixes engine bugs, so code behaves the same in old and new browsers. You can import only the features you need, or use core-js-pure to get them without changing global objects. Babel and SWC inject core-js automatically based on your target browsers, using the data in core-js-compat.
Problems it solves
- my JavaScript breaks in older browsers that don't have newer array and promise methods
- a customer's users on old Safari get a blank page from the widget I embed on their site
- add only the polyfills my target browsers actually need instead of a huge bundle
- use new JavaScript features like Set methods and iterator helpers before every browser has them
- polyfill features in a library without changing global objects that my users' pages rely on
- make Babel add polyfills automatically based on my browserslist
- URL and URLSearchParams don't work in an older browser I still have to support
- a browser's built-in implementation has a bug and I need consistent behaviour everywhere
- build a custom polyfill bundle for a list of browsers
- try upcoming ECMAScript proposals in my code today
Features
- ECMAScript polyfills up to 2026
- ECMAScript proposals
- WHATWG/W3C features such as URL
- fixes for engine bugs
- modular imports
- pure version without global pollution (core-js-pure)
- compatibility data (core-js-compat)
- custom bundle builder (core-js-builder)
- Babel and SWC integration
- online playground
