Version Comparator
Compare two semantic versions to see which is newer and why, or sort a whole list of versions by SemVer precedence.
Enter two versions to see which one is higher and the exact rule that decides it - or paste a list to sort it correctly.
Compare two versions
Sort a list of versions
More Software Version / Package Tools
View all 9To compare version ranges rather than single versions, use the Version Range Calculator.
What Is the Version Comparator?
It compares versions using Semantic Versioning precedence - the same ordering npm, Cargo and most release tooling use. Plain text sorting gets this wrong: as text, 1.10.0 sorts before 1.2.0, and 1.0.0-beta.11 before 1.0.0-beta.2.
When to Use It
- To check which of two builds or releases is actually newer.
- To order a list of Git tags or release versions correctly.
- To understand why a prerelease was or wasn't picked up by an update.
How to Use It
- Type Version A and Version B - the result updates as you type.
- Use the swap button to flip them.
- To sort, paste a list and choose ascending or descending.
How Precedence Works
- MAJOR, then MINOR, then PATCH are compared as numbers.
- A prerelease is lower than the normal release:
1.0.0-rc.1<1.0.0. - Prerelease identifiers are compared one by one: numbers numerically (
beta.2<beta.11), text in ASCII order (alpha<beta), and a number always ranks below text. - If all shared identifiers match, more identifiers wins:
1.0.0-alpha<1.0.0-alpha.1. - Build metadata (
+...) is ignored, so1.0.0+aand1.0.0+bare equal.
Understanding the Result
Besides the < / = / > answer, the tool tells you whether the difference is major (breaking), minor, patch or prerelease-only, and which identifier decided it. When sorting, versions that differ only by build metadata keep a stable order.
Limitations
Inputs must be valid SemVer (a leading v is optional) - check doubtful ones with the SemVer Validator. Python and Composer versions order slightly differently; see the Python Requirements Version Helper and Composer Version Constraint Helper.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.