How to get started
Use defaults if you’re building a web application for
the global audience.
Use node 18 if you’re building a Node.js application,
e.g., for server-side rendering.
Autoprefixer, Babel and many other tools will find target browsers automatically if you add the following to package.json:
"browserslist": [
"defaults and fully supports es6-module",
"maintained node versions"
]
Query syntax
Start with the default configuration
You can pick a sound set of versions with the defaults query which is
a shortcut for > 0.5%, last 2 versions, Firefox ESR, not dead.
It matches recent versions of popular and supported browsers worldwide and includes
Firefox Extended Support Release which is updated roughly annually.
The defaults query was thoroughly designed by the
Browserslist community.
It helps promote best practices and avoid common pitfalls.
Select browser versions with certain usage
You can pick versions that have more than or less than a certain size of the audience worldwide, in a region, or in a country. You can also use the visitor data of your own website.
Examples
> 5%all versions with > 5% of the audience worldwide.>= 5% in USsame as above but in the US.>= 5% in alt-ASsame as above but in Asia.
Beware
- You may exclude the most recent versions of all browsers that have been just
released. Please always add
last … versionsto include them back. - You can exclude your global audience. Please be careful when narrowing the audience to a region or a country.
- You may include
deadversions. Please consider addingnot dead.
Advanced
> 5% in my statsversions with > 5% of usage within your own audience.> 5% in circle-ci statsversions with > 5% of usage within the audience data from shareable configuration, available as custom stats.cover 99.5%the smallest set of popular versions with collective usage over 99.5% of the audience worldwide.cover 99.5% in CNsame as above but in China.cover 99.5% in alt-EUsame as above but in Europe.
Select browser by Baseline
By Baseline.
Examples
baseline widely availableversions of Chrome, Edge, Firefox, and Safari supports the current Baseline Widely available set of features, which have been interoperable in those browsers for at least 30 months.baseline newly availablerecent versions of Chrome, Edge, Firefox, and Safari, which supports the current Baseline Newly available set of features, which are interoperable in those browsers today.baseline 2024browser versions that are compatible with all features that were Baseline Newly available at the end of the specified year.baseline widely available with downstreamincludes browsers outside the core browser set that support the requested Baseline feature set based on their Chromium or Gecko version.
Beware
- Use Baseline Newly available with caution since it targets very recent browser versions.
Advanced
baseline widely available on 2024-06-06Baseline query for specific date.baseline widely available with downstream including kaiossame output as the previous query plus KaiOS from feature phones. However, extra caution should be taken with KaiOS as it has a very different set of screen limitations and interaction patterns to other modern browsers.
Select recent browser versions
You can pick a few recent browser versions.
Examples
last 2 versionslast 2 versions of each browser.last 2 Chrome versionssame as above but just Chrome.
Beware
- You might exclude older versions still used by a substantial audience.
Please always add
> …to include them back. - You may pick
deadbrowsers like Internet Explorer. Always uselast … versionswithnot dead.
Advanced
last 2 major versionsall minor and patch releases of the last 2 major versions.last 2 Safari major versionssame as above but just Safari.unreleased versionsalpha and beta versions.unreleased Chrome versionssame as above but just Chrome.since 2020-01-15versions released since Jan 15, 2020.since 2020-01versions released since January 2020, inclusive.since 2020versions released since 2020, inclusive.last 3 yearssame as above if you run this query in 2022.
Select specific browser versions
You can pick browser versions or a version range of your choice.
Examples
ChromeAndroid 103mobile Chrome version 103.Firefox > 20desktop Firefox versions newer than 20.iOS >= 13.2mobile Safari version 13.2 and newer.not Firefox ESRremoves specific version.
Beware
- Make sure that your audience uses specific versions
(e.g., in a corporate setting) or
that your application is not built to work with specific versions
(e.g., it’s a bleeding-edge demo
project). Please consider using
last … versionsor> …to include more versions. - Note, that Opera Mini has special version
all.not op_mini allis not a special query.
Advanced
ie 6-8an inclusive range of Internet Explorer versions.Firefox ESRthe latest Firefox Extended Support Release.
Select specific Node.js versions
You can pick Node.js versions or a version range of your choice. Useful if you know for sure the runtime configuration of your server-side code.
Examples
node 10latest10.x.xNode.js version.node 10.4latest10.4.xNode.js version.node > 16all Node.js versions newer than16.0.0.last 2 node versionstwo latest Node.js releases.last 2 node major versionstwo last major-version Node.js releases.
Advanced
maintained node versionsall Node.js versions currently maintained by Node.js Foundation.current nodethe Node.js version used by Browserslist right now.
Select browser versions that support a certain feature
You can pick browser versions that support features from the Can I Use database. See the caniuse-lite repository for the full list of features.
Examples
fully supports es6-moduleversions that fully support JavaScript modules via script tag.partially supports css-gridversions that fully or partially supports CSS Grid Layout.
Beware
supports …is an alias forpartially supports …, however as its naming is ambigious, prefer usingpartially supportsto make your intent of including partially supported browsers clear.- These queries rarely work well on their own. Please consider combining them with other queries.
Combine multiple queries into one
You can combine versions matched by multiple queries with or or ,; you can
intersect them with and. You can also negate any query with not if it’s
not the first one in your list.
Examples
-
> 0.5%, last 2 versionscombines> 0.5%withlast 2 versions. > 0.5% or last 2 versionssame as above.> 0.5% and last 2 versionsintersects> 0.5%withlast 2 versions.> 0.5% and not last 2 versionsremoveslast 2 versionsfrom> 0.5%.
Beware
- A query with
notcan't be the left-hand one in the list. - A query with
notis always joined to the left-hand one withand, even iforor,are used.
Advanced
-
The following queries yield the same result:
> 0.5% and not last 2 versions,> 0.5% or not last 2 versions,> 0.5%, not last 2 versions.
Exclude unmaintained browser versions
You can combine your queries with
not dead
to exclude dead browsers, i.e.,
browsers without official support or updates for more than 24 months.
Right now these include IE 11, IE Mobile 11, BlackBerry 10, BlackBerry 7,
Samsung 4, Opera Mobile 12.1, and all versions of Baidu.
Examples
> 0.2% and not deadexcludesdeadversions from versions matched by> 0.2%.
Why Browserslist
Browserslist helps you keep the right balance between browser compatibility and bundle size. With Browserslist, you will cover wider audience and have smaller bundle size.