Category: Developer tools

Semver Compare

System ideaMissing a tool?

Compare two semantic versions and see which is newer

Compare two Semantic Versioning 2.0.0 version strings, see which is newer, and see whether the difference is major, minor, patch or pre-release. Runs entirely in your browser.

ResultVersion A is olderDifferenceMinor

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Semantic Versioning gives major.minor.patch a precise meaning and defines exact precedence rules for pre-release identifiers, so 1.0.0-alpha sorts before 1.0.0 and 1.0.0-alpha.2 sorts before 1.0.0-alpha.10 numerically rather than as text. This tool parses both versions against the semver.org spec, tells you which one is newer, and names the most significant field that differs between them.

How to use it

  1. Enter Version A and Version B, e.g. 1.4.2 and 1.5.0-beta.1.
  2. Read which version is newer.
  3. Check the Difference field to see whether it's a major, minor, patch or pre-release change.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Does a pre-release version count as older than the release?
Yes. Per the semver spec, 1.0.0-alpha has lower precedence than 1.0.0, since a pre-release is considered unstable and not yet the version it precedes.
How are pre-release identifiers like alpha.2 and alpha.10 compared?
Purely numeric identifiers compare as numbers, so alpha.2 sorts before alpha.10; identifiers with any letters compare as plain text instead, following the semver precedence rules exactly.
Does build metadata after a + sign affect the comparison?
No. Build metadata such as +build.5 is ignored for precedence purposes, exactly as the semver spec requires.