SemVer Calculator & Range Checker
Test package version ranges (^, ~, >=, ||), preview version bumps, and compare precedence
About SemVer Calculator & Range Checker
How SemVer Calculator & Range Checker Works
Implements official SemVer 2.0.0 lexical specifications and node-semver range desugaring logic entirely in browser JavaScript. Computes major, minor, patch, and prerelease permutations in local memory with zero external dependencies.
SemVer Calculator & Range Checker is a developer utility for testing, calculating, and comparing package versions against Semantic Versioning (SemVer 2.0.0) specifications. Enter any npm, Cargo, or Composer range expression (such as ^18.2.0, ~5.3.0, or >=1.0.0 <2.0.0 || >=3.0.0) to instantly test candidate versions and verify compatibility. The tool also calculates release increments (major, minor, patch, premajor, preminor, prepatch, prerelease) with custom preview tags, and compares two versions under strict precedence rules.
Frequently asked questions
What is the difference between Caret (^) and Tilde (~)?+
The caret (^) allows updates that do not change the leftmost non-zero digit. For version ^1.2.3, it allows >=1.2.3 <2.0.0 (minor and patch updates). For version ^0.2.3, it only allows patch updates >=0.2.3 <0.3.0. The tilde (~) strictly allows patch-level updates only: ~1.2.3 means >=1.2.3 <1.3.0.
How do prereleases behave in SemVer range matching?+
Under SemVer 2.0.0, prerelease versions (like 1.2.0-beta.1) have lower precedence than the normal release (1.2.0) and are excluded from ranges unless a comparator explicitly specifies a prerelease on the same major.minor.patch tuple.
How does the comparator evaluate precedence between prerelease identifiers?+
Identifiers consisting only of digits are compared numerically (e.g. 1.0.0-alpha.2 is less than 1.0.0-alpha.10). Identifiers with letters are compared lexically in ASCII order. Numeric identifiers always have lower precedence than alphanumeric ones.
Does this tool execute client-side?+
Yes, 100% client-side in your browser. No package names, version constraints, or internal library versions are ever uploaded to any server.
Limitations
Implements SemVer 2.0.0 and node-semver range syntax. Python PEP 440 or Debian package versioning have subtle syntax differences.