Free online tools to generate, calculate,
convert, format, encode, and play.
 

Semver Compare

Compare semantic versions, check range compatibility, and sort version lists. Supports caret (^), tilde (~), and comparison operators.


Compare Versions

-
Compares as you type.

Range Checker

Checks as you type.
Examples:

Sort Versions


How Semantic Versioning Works

Semantic Versioning (semver) uses a three-part version number: MAJOR.MINOR.PATCH, optionally followed by a pre-release label and build metadata.

Version Parts
  • MAJOR — Incompatible API changes
  • MINOR — Backward-compatible new features
  • PATCH — Backward-compatible bug fixes
  • -pre — Pre-release label (e.g., -alpha.1, -beta.2)
  • +build — Build metadata (ignored in comparisons)
Range Operators
OperatorMeaningExample
^Compatible with version (same major)^1.2.3 = >=1.2.3 <2.0.0
~Approximately equivalent (same minor)~1.2.3 = >=1.2.3 <1.3.0
>=Greater than or equal>=1.0.0
<=Less than or equal<=2.0.0
>Greater than>1.0.0
<Less than<2.0.0
=Exact match=1.2.3
x / *Any value1.2.x = >=1.2.0 <1.3.0
||OR (union of ranges)>=1.0.0 <2.0.0 || >=3.0.0
Comparison Rules
  • Major, minor, and patch are compared numerically from left to right
  • Pre-release versions have lower precedence than the associated normal version (e.g., 1.0.0-alpha < 1.0.0)
  • Pre-release identifiers are compared left to right: numeric identifiers sort numerically, string identifiers sort lexically
  • Build metadata (+build) is ignored when comparing versions

Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with