Browserslist generator — target browsers for your build tools

Choose how old the browsers you support may be, add or exclude queries, and the tool writes a Browserslist config that Autoprefixer, Babel and other build tools read.

Live demo · real result from this tool
Format

.browserslistrc

# .browserslistrc — Browserslist defaults# defaults = > 0.5%, last 2 versions, Firefox ESR, not dead.# Check coverage with: npx browserslist --coverage defaultsnot op_mini all 

Run npx browserslist --coverage to see the exact browsers and the share of users they cover — it reads current caniuse data, which this page does not.

Processed on your device — nothing is uploaded.

How to use the Browserslist generator

  1. Choose a Target: Browserslist defaults, Baseline widely available, Modern evergreen, Broad, or Legacy (older devices).
  2. Add Extra queries (one per line) if needed, for example node 22.
  3. List anything to drop in Exclude (one per line). op_mini all is filled in.
  4. Pick the Format: a .browserslistrc file or a browserslist field for package.json.
  5. Tick Separate development target (latest browsers only) if you want faster local builds, then copy the result.

What it does and when to use it

Build tools need to know which browsers to support. Autoprefixer uses it to decide which CSS prefixes to add, and Babel uses it to decide which JavaScript to rewrite for older engines. Browserslist is the shared format all these tools read, so one list keeps them in step.

Use it when a project has no list, or to drop very old browsers and shrink your output. Babel’s preset-env reads the list when no targets are set, as in the Babel config generator output. The package.json form goes into the file from the package.json generator; check the merged file with the JSON validator.

How it works

Each preset is a short list of queries, which Browserslist joins with OR:

Preset Queries
Browserslist defaults defaults (> 0.5%, last 2 versions, Firefox ESR, not dead)
Baseline widely available baseline widely available (needs Browserslist 4.25+)
Modern evergreen last 2 versions of Chrome, Firefox, Safari (major) and Edge, plus Firefox ESR
Broad > 0.2%, last 2 versions, Firefox ESR, not dead
Legacy > 0.1%, last 4 versions, Firefox ESR, not dead, iOS and Safari 12+, Chrome 70+

Your extra queries follow the preset, and the exclusions come last as not lines. A not line removes browsers from everything above it, which is why the tool keeps exclusions at the end.

Worked examples

Defaults with Opera Mini removed.

# .browserslistrc — Browserslist defaults
# defaults = > 0.5%, last 2 versions, Firefox ESR, not dead.
# Check coverage with: npx browserslist --coverage

defaults
not op_mini all

Baseline in package.json with a development target. The output is a browserslist object with a production list ("baseline widely available", "not op_mini all") and a development list of the last Chrome, Firefox and Safari versions.

Legacy plus Node.js, without IE. Preset Legacy, extra node 22, exclusions op_mini all and IE 11. The seven legacy queries are followed by node 22, not op_mini all and not IE 11.

Limits and tips

  • Update the data. Usage numbers come from the caniuse-lite package in your project; run npx update-browserslist-db@latest now and then.
  • One config only. If both .browserslistrc and a package.json field exist, Browserslist reports an error; keep one.
  • Test a query before you commit it on the official browsersl.ist site.

Frequently asked questions

Which preset should I start with?
Browserslist defaults suits most public websites. Baseline widely available targets browsers that support every web feature that has been Baseline for 30 months. Choose Legacy only if your visitors use older phones or locked-down office PCs.
Why does the page not show how many users are covered?
Coverage depends on current usage data from caniuse, which changes every month and is not stored on this page. Run npx browserslist --coverage in your project to see the exact browsers and their share.
Why is Opera Mini excluded by default?
Opera Mini's extreme data-saving mode renders pages on a server and runs little JavaScript, so few modern sites work in it. Clear the Exclude box if you need it.
What is the development target for?
With Separate development target ticked, local builds target only the latest Chrome, Firefox and Safari, which is faster and needs fewer fixes. Production builds still use the full list. Tools pick the section from BROWSERSLIST_ENV or NODE_ENV.
Do I write "not" in the Exclude box?
No need. The tool adds "not " to each line that does not already start with it, so IE 11 becomes not IE 11.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close