Skip to main content

Free Semantic Version Comparator Online

Semantic Version Comparator compares semantic versions per semver.org, tells you which is greater, and checks whether a version satisfies a range like caret, tilde, or comparator expressions.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

1.0.0-rc.1 < 1.0.0 because a pre-release has lower precedence than the release.

Precedence Self-Check

PASS

1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0

100% Private

All version parsing and comparison runs locally in your browser. Nothing is uploaded.

How to Use Semantic Version Comparator

1

Enter the Versions or Range

Type the two versions you want to compare, or enter a single version alongside a range expression using caret, tilde, comparators, or the double-pipe operator to test whether it is satisfied.

2

Read the Precedence Result

The comparator applies the semver.org rules and shows which version is greater, or whether the version satisfies the range, handling pre-release tags and ignoring build metadata exactly as a package manager would.

3

Adjust and Recompare

Change either input to explore how pre-release tags, build metadata, or a different range operator affect the outcome, learning the precedence rules interactively without installing any command line tooling.

Compare Semantic Versions and Check Ranges Correctly

Semantic versioning gives software releases a shared grammar: a version is written as major, minor, and patch numbers separated by dots, optionally followed by a pre-release tag after a hyphen and build metadata after a plus sign. The rules for comparing two such versions are precise, published at semver.org, and surprisingly easy to get wrong when you compare them as plain strings. This comparator implements those rules faithfully. Give it two versions and it tells you which one has higher precedence, or give it a version and a range and it tells you whether the version satisfies the range. Everything runs in your browser, so it is instant and works even offline once the page has loaded. The precedence rules are where careful implementation matters. Comparison proceeds field by field: major, then minor, then patch, each compared as an integer, so 1.10.0 is correctly greater than 1.9.0 even though the string 1.9.0 would sort later alphabetically. When the numeric parts are equal, the pre-release tag decides the outcome, and the key rule is that a version with a pre-release tag has lower precedence than the same version without one — so 1.0.0-alpha is less than 1.0.0. Pre-release tags themselves are compared identifier by identifier: a purely numeric identifier is compared numerically and always sorts below an alphanumeric identifier, while alphanumeric identifiers are compared in ASCII order. Build metadata, the segment after the plus sign, is completely ignored for precedence, so 1.0.0 and 1.0.0 with build metadata are considered equal. Putting these together gives the canonical ordering 1.0.0-alpha, then 1.0.0-beta, then 1.0.0-rc.1, then 1.0.0, which is exactly the order in which those releases would ship. Ranges are the other half of the tool, because in practice you rarely pin an exact version — a dependency is declared with an operator that allows a family of compatible releases. The caret operator is the most common: caret 1.2.3 allows any version that is at least 1.2.3 and below 2.0.0, meaning it accepts minor and patch updates but not a new major that could break compatibility. The tilde operator is tighter: tilde 1.2.3 allows patch updates up to but not including 1.3.0. Comparator operators such as greater-than-or-equal combine to form intervals, an x-range like 1.x accepts any version in the 1 series, a bare asterisk accepts anything, and the double-pipe joins several ranges as alternatives. Paste a version and a range and the tool evaluates the same satisfies logic that a package manager uses when it resolves your dependency tree, which turns an abstract range into a concrete yes-or-no answer. The uses are everywhere in dependency work. A developer reviewing a lockfile can confirm whether an installed version actually falls inside the range declared in the manifest, catching a resolution surprise before it reaches production. A maintainer deciding how to publish a bugfix can check that the new patch version has higher precedence than the last release and lower precedence than the next minor. Someone auditing a security advisory can paste the affected range and their installed version to learn immediately whether they are exposed. And anyone confused about why a pre-release did not get installed can compare it against the plain release and see that the pre-release has lower precedence, which is precisely why package managers exclude pre-releases by default unless you opt in. A few tips prevent the classic mistakes. Never compare versions as strings, because string comparison sorts 10 before 9 and treats a pre-release as greater than its release; use precedence rules instead, which is what this tool does for you. Remember that build metadata never affects ordering, so if two versions differ only after the plus sign they are equal for every practical purpose. When reasoning about a caret range, keep the special case in mind that for versions below 1.0.0 the caret is much stricter, because the leading zero signals an unstable API. Finally, if a version fails to parse, check for a missing patch number or an illegal character in the pre-release tag, since the specification requires the full major-minor-patch triple and restricts pre-release identifiers to alphanumerics and hyphens. Because the comparator runs entirely in your browser, you can check as many versions and ranges as you like with no signup and no data leaving your device.

Semantic Version Comparator Formula & Method

Compare major.minor.patch as integers; equal → version with pre-release < version without; pre-release identifiers compared left-to-right (numeric < alphanumeric, ASCII order); build metadata ignored. ^1.2.3 → >=1.2.3 <2.0.0; ~1.2.3 → >=1.2.3 <1.3.0

Examples: Semantic Version Comparator

Input

Order these: 1.0.0, 1.0.0-rc.1, 1.0.0-alpha, 1.0.0-beta

Result

1.0.0-alpha < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0

Every pre-release has lower precedence than the release, and the pre-release tags sort in ASCII order among themselves.

Input

Does 1.9.0 satisfy the range ^1.2.3?

Result

Yes — ^1.2.3 means >=1.2.3 and <2.0.0, and 1.9.0 falls inside that interval

The caret operator allows any minor or patch update below the next major, so 1.9.0 is accepted while 2.0.0 would not be.

Frequently Asked Questions – Semantic Version Comparator

Enter both versions and the comparator tells you which has higher precedence following the semver.org rules. It compares major, minor, and patch as integers, then applies pre-release rules, and ignores build metadata. This avoids the common mistake of string comparison, which would wrongly sort 1.10.0 below 1.9.0 because it compares character by character rather than numerically.