Version Number Comparator

Compare two version numbers to see which is newer, following semantic-versioning rules.

Comparing versions properly

Version numbers do not compare like ordinary text — 1.10 is newer than 1.9, even though 9 looks bigger than 1 as a character. This compares two version strings the way software actually versions, part by part as numbers, so you get the correct answer to which is newer rather than the wrong one a plain string comparison gives.

Enter two versions and see which is greater.

Why string comparison fails

The trap is that comparing versions as plain strings sorts them alphabetically, which puts 1.10 before 1.2 and breaks any logic that depends on version order — dependency checks, update prompts, feature gates. Semantic versioning compares the major, minor and patch numbers each as integers, and handles pre-release suffixes like beta correctly, which sort before the final release. Getting this right matters wherever code decides whether one version is newer than another, a surprisingly common and surprisingly bug-prone task.

Questions & answers

Why is 1.10 newer than 1.9?

Because each part is compared as a number, and 10 is greater than 9. Comparing as plain text wrongly sorts 1.10 before 1.9.

Does it handle pre-release versions like beta?

Yes — pre-release suffixes sort before the final release, following semantic-versioning rules.

Is anything uploaded?

No. The comparison happens in your browser.

More Developer tools