Back to home

Semantic Version Comparison

Enter two versions to see which is newer under the Semantic Versioning rules, or paste a list to sort it. Pre-release tags are handled correctly.

  1. Enter two versions or a list
  2. See which is newer
  3. Copy the sorted list
Loading the tool...

Your files never leave your device

How the comparison works

Semantic Versioning writes a release as MAJOR.MINOR.PATCH, and the tool compares the three numbers from left to right. Use the Compare tab for two versions and the Sort a list tab for many, one per line, with an option to put the newest first. The result also breaks each version into its major, minor, patch, pre-release and build parts so you can see why one is ahead.

A worked example

Paste these four versions into the list: 1.10.0, 1.2.0, 1.9.1 and 1.10.0-rc.1. Sorted from oldest to newest they become 1.2.0, 1.9.1, 1.10.0-rc.1 and 1.10.0. Plain alphabetical sorting would put 1.10.0 before 1.2.0 because the character 1 comes before 2, which is the classic mistake this tool avoids.

In the same way, comparing 1.4.0-beta.2 with 1.4.0 reports that the second version is newer, because a pre-release always sits below the release it leads up to.

Limits and common mistakes

Every version must have three numeric parts without leading zeros, so 1.2 or 01.2.3 is reported as invalid. A leading v, as in v1.2.3, is accepted and ignored. Two versions that differ only in build metadata, such as 1.0.0+a and 1.0.0+b, are treated as equal.

Remember that the rules only order versions; they do not tell you whether an upgrade is safe. A jump in the major number usually signals breaking changes, but that depends on how the project's authors use the scheme.

Frequently asked questions

What is semantic versioning?

It is a scheme of three numbers, major, minor and patch, that signals the kind of change. A major increase may break compatibility, a minor one adds features and a patch one fixes bugs.

How are pre-release versions ordered?

Identifiers are compared one by one. Alpha comes before beta, and numeric parts are compared as numbers, so rc.2 is older than rc.10.

Is 1.10.0 newer than 1.9.0?

Yes. Each part is compared as a number, not as text, so 10 is larger than 9. Text sorting would give the wrong answer.

Is a leading v allowed?

Yes. A leading v, as in v1.2.3, is accepted and ignored, which is handy for version tags copied from a repository.

Why is my version invalid?

It must have three numeric parts with no leading zeros, like 1.2.3. Shortened forms such as 1.2 or versions with extra text are rejected.

Is anything uploaded?

No. The versions are compared on your device and are never sent anywhere.

Related tools

Save this tool to use it later

Add this page to your browser bookmarks by pressing Ctrl + D