Skip to main content
Developer tools100% FreeInstant

Semver Comparator: Which Version Is Newer?

This free semver comparator tells you which of two semantic versions is higher, using the official precedence rules, including pre-release tags such as alpha and beta, and ignoring build metadata.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

Semantic versioning gives every release a number with a meaning. Major, minor and patch show how big a change is, and pre-release tags mark unfinished builds. Comparing them by eye fails with versions like 1.9 and 1.10.

Enter two versions and see which is newer.

How to Use This Tool

  1. Enter version A.
  2. Enter version B.
  3. Press Compare.
  4. Read which is higher and what kind of change separates them.

How the Calculation Works

The versions are split into major, minor and patch numbers and compared as numbers in that order. If these are equal, a version without a pre-release is higher. Pre-release identifiers are compared one by one: numbers numerically, text alphabetically, numbers lower than text, and a shorter list lower than a longer one with the same start.

Worked Example

1.4.2 against 1.10.0-beta.1: the minor number 10 beats 4, so B is newer, and the change is a minor release.

Common Uses

  • Dependency checks.
  • Release notes.
  • Scripts that choose the latest version.
  • Learning semver.

Tips and Common Mistakes

  • Use three numbers, major.minor.patch.
  • Alpha is lower than beta by alphabetical order.
  • Build metadata never changes the order.

Next, you may need the bitwise calculator, checksum calculator, JSON to TypeScript, string escape tool.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

Each part is a number, not text. 10 is bigger than 9, so 1.10.0 comes after 1.9.0.
A pre-release is lower than the same version without one: 1.0.0-beta is lower than 1.0.0. Pre-release tags are compared part by part.
No. Anything after a plus sign, such as +build.5, is ignored.
The tool accepts a leading v, such as v2.1.0, and ignores it.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.