Semver Range Tester
Last updated:
Paste an npm-style semver range and a list of versions — see which ones satisfy it, with the real caret/tilde/X-range and pre-release rules npm actually uses. All in your browser, nothing uploaded.
How it works
- Another interactive checker, not a Format/Minify/To-JSON triad — one range against a list of sample versions, showing which satisfy it and why.
- Implements npm’s actual range grammar (the one
package.jsondependencies use), not just bare semver.org precedence:^caret ranges (with the well-known 0.x special case —^0.2.3only allows patch bumps,^0.0.3allows none),~tilde ranges, X-ranges (1.2.x,1.2,*), hyphen ranges (1.2.3 - 2.3.4), explicit comparators (desugared against a partial version rather than rejected —>1.2means>=1.3.0),||for OR, and whitespace for AND. - Pre-release versions follow npm’s specific rule, not the naive numeric one: a pre-release like
1.2.4-beta.1only satisfies a range if that range has a comparator at the exact same[major, minor, patch]that itself carries a pre-release tag. That means^1.2.3does not match1.2.4-beta.1, even though 1.2.4 is numerically inside the range — a caret/tilde/X-range expansion never produces a pre-release comparator on its own, so it can never match one. This is genuinely how npm behaves, not a simplification.
Runs entirely in your browser — nothing you paste here is uploaded, logged, or stored.