semver range tester
Type an npm-style range and a few versions. The range is expanded into the plain-English bounds it actually means, every version is tested, and the pre-release rule that catches everyone is spelled out. It runs entirely in your browser, so it works offline and nothing is sent anywhere.
examplesRange syntax
| Syntax | Means |
|---|---|
| 1.2.3 | exactly 1.2.3 |
| ^1.2.3 | compatible with 1.x: >=1.2.3 <2.0.0. On a zero major it tightens: ^0.2.3 is >=0.2.3 <0.3.0, ^0.0.3 is >=0.0.3 <0.0.4. |
| ~1.2.3 | patch-level: >=1.2.3 <1.3.0. ~1.2 and ~1 widen to the minor / major. |
| 1.2.x 1.x * | wildcard: 1.2.x is >=1.2.0 <1.3.0; 1.x is >=1.0.0 <2.0.0; * is any version. |
| 1.2.3 - 2.3.4 | inclusive range: >=1.2.3 <=2.3.4. A partial upper bound rounds up. |
| >= <= > < = | plain comparators, AND-joined by spaces: >=1.0.0 <2.0.0. |
| || | OR between comparator sets: ^1.2.3 || ^2.0.0. |
The pre-release rule, plainly: a version like 1.2.4-beta.1 is excluded from ^1.2.3 even though it is numerically in range. A pre-release only matches when the range itself names a pre-release at the same major.minor.patch — for example 1.2.4-beta.1 matches >=1.2.4-alpha <1.3.0. This mirrors npm's default (includePrerelease: false).