xutil.dev
Login

Semver Calculator

Compare, validate ranges, increment, and sort semantic versions. Fully spec-compliant

Parse Version
Major
1
Minor
2
Patch
3
Pre-release
beta.1
Build
build.456
Normalized
1.2.3-beta.1+build.456
Compare Versions
vs
1.2.3 < 1.3.0Older
Range Check
1.2.5 in ^1.2.3Satisfies
Version Increment
Major
2.0.0
Minor
1.3.0
Patch
1.2.4
Pre-release
1.2.4-0
Sort Versions
Ascending order
1.0.9.0
2.1.0.0-alpha
3.1.0.0-beta
4.1.0.0
5.2.0.0
6.3.1.0
Range Expression Reference
^1.2.3
Compatible with version (does not modify the left-most non-zero). ^1.2.3 = >=1.2.3 <2.0.0
~1.2.3
Approximately equivalent (allows patch-level changes). ~1.2.3 = >=1.2.3 <1.3.0
>=1.0.0
Greater than or equal to version
<=2.0.0
Less than or equal to version
>1.0.0
Greater than version
<2.0.0
Less than version
1.0.0 - 2.0.0
Hyphen range (inclusive). 1.0.0 - 2.0.0 = >=1.0.0 <=2.0.0
^1.0.0 || ^2.0.0
Union of ranges (satisfies either)