Understanding Browserslist queries and how tools use them
How last N versions, coverage percentages, and not dead combine, why order and dedupe matter, and how bundlers read your target list.
One list, many tools
Browserslist exists so that every build tool agrees on the same set of target browsers. Instead of configuring Babel, Autoprefixer, and PostCSS separately, you write one query list and they all read it. That is why a .browserslistrc file, or a browserslist field in package.json, quietly controls how much JavaScript gets transpiled and which CSS prefixes appear. Changing a single line can shrink or grow your bundle across the whole toolchain.
The building blocks of a query
Queries come in a few shapes. Version queries like 'last 2 versions' pick recent releases of each browser. Usage queries like '> 0.5%' pick browsers by market share from the caniuse dataset. Exclusion queries such as 'not dead' and 'not ie 11' subtract browsers from whatever the earlier lines selected. This generator lets you combine a preset seed with a version query, a coverage query, and those two common exclusions, plus any raw lines you add yourself.
Why order and de-duplication matter
Browserslist evaluates queries left to right and top to bottom, so a 'not' query only removes browsers that earlier queries already added. The generator keeps a deliberate order: preset, then last N versions, then coverage, then the exclusions, then custom lines. It also removes exact duplicates while keeping the first one, so ticking 'not dead' when the modern preset already includes it does not produce a repeated line. The output stays clean and predictable no matter which options you combine.
Picking a sensible target
A common starting point is the 'defaults' query, which balances reach and modernity for most sites. If you want a leaner, faster bundle, the modern preset with 'last 2 versions' and 'not dead' drops legacy code paths. If you support a wider audience, lower the coverage percentage to include more of the long tail. Whatever you choose, commit the file so teammates and continuous integration build for exactly the same browsers you do.