Semantic Version Calculator – Compare, Sort and Bump Versions Instantly

Use the free Semantic Version Calculator below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.

What Is Semantic Versioning?

Semantic versioning, usually shortened to semver, is a simple agreement about what version numbers mean. A version has three numbers: major.minor.patch. You raise the major number when you make a change that breaks compatibility, the minor number when you add a feature that stays compatible, and the patch number when you fix a bug without changing behavior. Version 2.3.4 therefore means the second major release, the third compatible feature set, and the fourth bug fix on top of that.

This agreement only works if everyone follows it, and in practice most popular libraries do. That is why package managers can safely install updates: a tool that accepts versions from 2.0.0 up to, but not including, 3.0.0 trusts that nothing in the 2.x line will break its code. When a maintainer breaks that trust and ships a breaking change as a minor release, users notice fast, because builds break for reasons that look mysterious. Semver is a social contract backed by tooling, and the calculator above helps you apply its rules exactly.

Why Comparing Versions Is Harder Than It Looks

Comparing versions as plain text gives wrong answers. As text, 1.10.0 comes before 1.4.0, because the character 1 sorts before 4. As versions, 1.10.0 is newer, because the minor number 10 is bigger than 4. Any code that sorts version strings alphabetically will eventually install the wrong release or skip an update. The calculator compares each number part on its own, so 1.10.0 correctly beats 1.4.2, and 2.0.0 beats 1.99.99.

Pre-release versions add another rule that surprises people. A version like 1.0.0-beta.1 is older than 1.0.0, not newer. The pre-release tag means the release is not finished yet, so it sorts before the matching final release. Build metadata after a plus sign, like 1.0.0+build.5, is ignored when comparing, because it describes how the release was built, not which release it is. The calculator follows both rules, and it accepts an optional leading v, so v1.2.3 works the same as 1.2.3.

How to Use the Calculator

To compare two versions, type them into the two boxes and press Compare. The tool tells you whether the first is older, equal, or newer than the second, and it reports invalid input in plain words instead of silently guessing. To bump a version, type it in and pick major, minor, patch, or pre-release. A major bump of 2.3.4 gives 3.0.0, a minor bump gives 2.4.0, and a patch bump gives 2.3.5. A pre-release bump turns 2.3.4 into 2.3.4-beta.1, or steps an existing pre-release tag forward.

To sort a list, paste one version per line and press Sort. The tool checks every line first and names any invalid line instead of dropping it quietly, which matters when the list came from a changelog or a release feed. Sorting is useful before a release review, when you want to see the order releases actually shipped, or when you are cleaning up tags in a repository and need to spot the gaps.

Choosing the Next Version

The hardest part of semver is not the arithmetic but the judgment call. Ask one question: would this change break someone who uses the current version correctly? If yes, it is major. If it only adds something new, it is minor. If it only fixes something broken, it is patch. Renaming a function, removing a parameter, or changing a return type is major. Adding an optional parameter is minor. Fixing a crash is patch. When you are unsure between minor and major, choose major. Users forgive a major bump that turns out to be safe; they do not forgive a minor bump that breaks their build.

For version 0.x releases the rules are looser by agreement: anything may change at any time, because the project is saying it is not stable yet. Once you reach 1.0.0, you are telling the world the public API is stable, so treat that milestone seriously. Keep a changelog that lists what changed in each release in plain language, and let the version number summarize it. Good versioning is a form of communication, and this calculator handles the math so you can focus on the message.

Related tools

1 thought on “Semantic Version Calculator – Compare, Sort and Bump Versions Instantly”

  1. Pingback: Calcular Versiones Semver Gratis - Compara, Ordena y Sube Versiones

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top