Semver range checker
Check whether a semantic version satisfies an npm-style range — instantly
and offline. It is for developers reasoning about a package.json dependency
range, debugging why an unexpected version installed, or learning how caret and
tilde actually behave.
How it works
The checker expands your range into a set of simple comparators following the node-semver rules, then tests the version against them:
- Caret
^1.2.0keeps the left-most non-zero field fixed →>=1.2.0 <2.0.0. - Tilde
~1.2allows patch-level changes →>=1.2.0 <1.3.0. - Wildcards
1.x,1.2.x,*expand to comparator pairs. - Hyphen ranges
1.2.3 - 2.3.4become>=1.2.3 <=2.3.4. - Comparators
>=1.0.0 <2.0.0are used directly; space means AND. - OR sets are joined with
||; the version satisfies the range if it matches any one set.
Pre-release tags are ordered per the spec: numeric identifiers rank below alphanumeric, and a version with no pre-release outranks one with.
Example
| Version | Range | Satisfies? |
|---|---|---|
| 1.4.2 | ^1.2.0 | yes (< 2.0.0) |
| 2.0.0 | ^1.2.0 | no |
| 1.2.9 | ~1.2 | yes |
| 1.3.0 | ~1.2 | no |
| 2.0.0-rc.1 | ^1.0.0 ‖ 2.0.0 | no (pre-release) |
The result shows whether the version matches and the expanded comparator set used, so the verdict is transparent. Everything runs in your browser — no package registry is ever contacted.