SemVer Range Checker
A tool that checks whether candidate versions satisfy an npm-style range from package.json (^, ~, comparators, ||, and hyphen ranges). You can see how 0.x versions and prereleases are handled and the expanded condition, and tags such as latest or Git URLs are distinguished from ranges. The registry is never queried — everything runs in your browser.
Result
Enter a version range and candidate versions to see which ones are in range.
How to use
- Enter a version range (e.g. ^1.2.0). The expanded condition (such as >=1.2.0 <2.0.0-0) is shown.
- Enter candidate versions, one per line.
- Each candidate shows In range, Out of range, or Invalid version.
- Check the --include-prerelease option to always include prereleases.
About this tool
The version ranges in package.json decide which versions npm install and updates can pick. This tool checks questions like whether ^1.2.0 includes 1.9.0 or 2.0.0 using the same semver library as npm.
^ locks the leftmost non-zero digit, so ^0.2.3 covers only 0.2.x and ^0.0.3 covers only 0.0.3. Prereleases (such as 1.3.0-beta.1) are only included when the range has a comparator with a prerelease on the same major.minor.patch.
dist-tags such as latest or next, Git URLs, and local paths depend on the registry or external state, so they aren't checked as ranges. Only the candidate versions you enter are checked; the registry is never queried.
With ~1.2.3 as the range, test 1.2.9 and 1.3.0 on separate lines. The first matches and the second does not. Changing the range to ^1.2.3 also admits 1.3.0, making the effect of changing a dependency constraint easy to compare.
You supply the candidate versions; the tool does not retrieve published releases. A match does not establish that a release exists or that it is compatible with your application. Paste the versions you are considering to evaluate the constraint without a registry request.
Frequently asked questions
What's the difference between ^ and ~?
^1.2.3 allows the same major version (>=1.2.3 <2.0.0), while ~1.2.3 allows the same minor version (>=1.2.3 <1.3.0).
Why is 1.10.0-beta.1 outside ^1.2.0?
npm excludes prereleases unless the range has a prerelease comparator on the same version. Enable the include-prerelease option to include them.
What happens if I enter latest?
It's identified as a dist-tag and not checked as a range, because the version it points to depends on the registry.