← All Tools

Semver Range Tester

Check whether a semantic version satisfies an npm-style range expression. Supports caret (^1.2.3), tilde (~1.2.3), hyphen (1.2.3 - 2.0.0), comparators (>=1.0.0 <2.0.0), wildcards (1.x, *) and OR (||).

e.g. ^1.2.3, ~1.2, 1.x, >=1.0.0 <2.0.0, 1.2.3 - 2.0.0
e.g. 1.5.0, 2.0.0-beta.1

Batch test

Paste one version per line and see which satisfy the range above.

VersionSatisfies

Range operators

^1.2.3≥ 1.2.3 and < 2.0.0 (compatible changes). For 0.x: ^0.2.3 → ≥ 0.2.3 < 0.3.0.
~1.2.3≥ 1.2.3 and < 1.3.0 (patch changes only).
1.2.xAny patch of 1.2 (equivalent to ≥ 1.2.0 < 1.3.0).
1.2.3 - 2.0.0Inclusive hyphen range: ≥ 1.2.3 and ≤ 2.0.0.
>=1.0.0 <2.0.0All comparators must match (AND).
1.x || >=3Either side matches (OR).
*Any version (pre-releases excluded unless a comparator includes one).

Pre-release versions only match a comparator set if at least one comparator in that set explicitly mentions a version with the same [major, minor, patch] tuple — matching npm semver behavior.