
Browserslist
A shared config file that tells front-end tools which browsers and Node.js versions to support.
- Stars
- 13.6k
- Forks
- 795
- Licence
- MIT
- Language
- JavaScript
- Last update
- 10 days ago
- Type
- Dev tool
What it is
Browserslist is a config format and tool that lets a project declare which browsers and Node.js versions it targets. Tools like Autoprefixer and Babel read this one shared setting, so you do not have to configure each tool separately. Queries such as "last 2 versions" are resolved using Can I Use data, so the list can stay current without manual edits.
- Add a browserslist key to package.json so Autoprefixer and Babel use the same target browsers
- Run npx browserslist in a project to see which browsers are currently targeted
- Test queries and config choices in the browsersl.ist playground
- Keep the Can I Use data up to date with the update-browserslist-db tool listed in the README
Great for
- Front-end developers using Autoprefixer, Babel, or Stylelint who want one shared browser list
- Teams that want to set browser support in one place for several build tools
- Projects that want support lists to update automatically as browser usage data changes
Not ideal for
- People with no build tools or CSS/JavaScript toolchain, since the config has no effect without a tool that reads it
- Projects that already set browser targets directly in each tool and see no need for a shared list
How to get it
- 1
Install with a package manager
You'll need: Node.js
Clone the repository
git clone https://github.com/browserslist/browserslist - 2
Run it
- Add a browserslist key to package.json, or create a .browserslistrc file, listing your target queries
- Run npx browserslist in your project directory to see the resolved browsers
- Run your build tool such as Autoprefixer or Babel, which will read the config automatically
- 3
Get the most out of it
- Use the browsersl.ist playground to test queries before committing them
- Add update-browserslist-db or browserslist-update-action to keep caniuse-lite data current
- Combine queries with "or" and "and" as described in the Queries section
- Use browserslist-lint to check the config for common mistakes
Downloads
Strengths
- Single shared config that many popular front-end tools read automatically
- Queries like "last 2 versions" avoid manual updates to browser lists
- Mature project with an active maintainer group and a large user base
Trade-offs
- Results depend on Can I Use data, so lists change over time as that data updates
- Query syntax has many combiners and can be hard to read for newcomers
- The README warns that some popular query choices can shape browser usage trends, so defaults need thought
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| browserslist (this) | 13.6k | Dev tool | beginner | 10 days ago | Front-end developers using Autoprefixer, Babel, or Stylelint who want one shared browser list |
| autoprefixer | 22.2k | Library | intermediate | 10 days ago | Front-end developers who write plain CSS and want to stop managing prefixes by hand |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.