Words & files

Put v1.2.0 before v1.10.0

Semantic version sorter

Put software versions in the right order instead of sorting them like ordinary words.

Free browser tool

Paste the versions you want to sort

Paste one version per line, such as 1.2.0, then choose the order.

Processed in your browser

Copy or download the result

No account. No signup.

Precedence reference

Semantic version ordering rules

Read each row as earlier or lower precedence on the left and later or higher precedence on the right.

Semantic version ordering rules
Earlier versionLater versionReason
1.2.01.10.0Minor numbers compare numerically, so 2 comes before 10
2.0.0-beta.112.0.0-rc.1Text prerelease identifiers compare in ASCII order after matching core numbers
2.0.0-rc.12.0.0Any prerelease has lower precedence than the matching stable release
1.0.0-alpha1.0.0-alpha.1When matching identifiers run out, the shorter prerelease comes first
1.0.0-beta.21.0.0-beta.11Numeric prerelease identifiers compare numerically

The sorter follows SemVer 2.0.0 precedence for strict major.minor.patch values. Build metadata does not change precedence, and invalid lines are handled by the option you choose.

Semantic Versioning 2.0.0 specification

Optional guide Learn more about this tool Open the full explanation and detailed steps.

How semantic version sorting works

Semantic versions compare major, minor, and patch numbers numerically. If those match, prerelease identifiers decide precedence; build metadata after + does not.

  1. Paste strict major.minor.patch values

    Use forms such as 2.1.0, 2.1.0-beta.3, or 2.1.0-beta.3+build.8. A leading v is optional when that setting is on.

  2. Choose ascending or descending

    Core numbers are compared as numbers. A prerelease comes before the matching stable release, and numeric prerelease parts come before text parts.

  3. Decide what invalid lines should do

    Versions such as 1.2, 01.2.3, or 1.2.3-beta.01 are not strict SemVer. Keep them separate, append them, remove them, or stop with an error.

Quick example

Sort stable and prerelease versions

The example places 1.2.0 before 1.10.0 and each 2.0.0 prerelease before the stable 2.0.0 release.

Common questions

Software version number sorter FAQ

Why does ordinary alphabetical sorting put 1.10.0 before 1.2.0?

Text sorting compares characters, while semantic sorting compares each numeric component. Ten is greater than two, so 1.10.0 belongs after 1.2.0 in ascending order.

Does a prerelease come before a stable release?

Yes. For the same major, minor, and patch values, 2.0.0-beta.1 has lower precedence than 2.0.0.

Does build metadata affect the order?

No. SemVer build metadata after a plus sign does not affect precedence. Equal-precedence entries, such as 1.0.0+one and 1.0.0+two, keep their original pasted order.

Are v-prefixed versions supported?

Yes when Accept a leading v is on. The prefix is ignored for comparison but preserved in the output.