Skip to main content
core-js is the most comprehensive and widely used JavaScript polyfill library. It provides a modular standard library for JavaScript, covering ECMAScript up to ES2025, ECMAScript proposals at various stages, and a selection of cross-platform Web APIs — all in a single, tree-shakeable package.

Why core-js exists

The ECMAScript specification evolves faster than browser and runtime vendors can ship implementations. Features ratified in one year may not reach full cross-browser support for years afterward. Older environments in enterprise and consumer contexts trail even further behind. core-js bridges this gap. It detects whether a native implementation is present and correct, and only installs a polyfill when needed. This means you can write modern JavaScript targeting any environment — from a current Chrome build to a decade-old Android WebView — without managing a hand-rolled collection of compatibility shims.

Three ways to use core-js

core-js ships in three forms to suit different deployment requirements:
PackageGlobal namespaceBest for
core-jsPollutes globalsApplications, most common use case
core-js-pureNo global pollutionLibraries, embedded components
core-js-bundlePollutes globalsDirect <script> tag / CDN usage
core-js (global version) installs polyfills directly onto built-in prototypes and constructors (Array.prototype, Promise, Set, etc.), matching the shape of the native standard library. This is the right choice for applications where you control the full environment. core-js-pure (ponyfill version) exports the same implementations as named ES module / CommonJS exports without touching the global scope. Prototype methods become standalone functions. This is the right choice for libraries that must not alter the environment for their consumers. core-js-bundle is a pre-built, minified version of the global polyfill ready for delivery via a CDN or a <script> tag, with no build step required.

The package ecosystem

core-js

The global polyfill. Installs missing features onto built-in globals. Use this in applications.

core-js-pure

Pollution-free ponyfill. Exports implementations as modules without modifying globals. Use this in libraries.

core-js-compat

Compatibility data tables mapping features to the minimum engine version that supports them. Consumed by Babel and swc integrations.

core-js-builder

Programmatic API for producing custom polyfill bundles targeting specific engine sets or feature subsets.

core-js-bundle

Pre-built global bundle ready for CDN delivery or direct <script> inclusion.

Integration with build toolchains

core-js is the polyfill backend for two mainstream JavaScript transpiler ecosystems: Babel@babel/preset-env accepts a corejs: '3.49' option and automatically injects only the polyfill imports your target environments actually need, based on core-js-compat data. @babel/runtime with corejs: 3 transforms usage of modern built-ins to pollution-free core-js-pure imports without any manual import statements. swc — The Rust-based transpiler supports the same entry and usage modes as @babel/preset-env, driven by the same core-js-compat data. Configure via the env.coreJs field in .swcrc. Both integrations require specifying a minor version (e.g., '3.49' rather than 3) so that polyfills introduced in minor releases are included correctly.

Current version and license

core-js is currently at version 3.49.0 and is distributed under the MIT license. It is maintained by Denis Pushkarev and supported entirely through community funding.

Next steps

Installation

Install core-js, core-js-pure, or core-js-bundle into your project.

Quick start

Get polyfills running in your application in minutes.

core-js package

Entry points, namespaces, and CommonJS API reference.

core-js-pure package

Using core-js without global namespace pollution.

Build docs developers (and LLMs) love