Toolvore

SemVer Sorter

Sort semantic versions by SemVer 2.0 precedence and keep original build labels, duplicates and tied order.

This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.

Sort strict SemVer 2.0 versions by numeric, release and pre-release precedence while retaining build labels and the original order of ties.

How to use it

  1. 1Paste one complete semantic version per line.
  2. 2Choose a sort direction and select Sort versions.
  3. 3Review the sorted text and copy or download it.

Example

Input
2.0.0+linux 2.0.0-rc.11 2.0.0-rc.2 2.0.0+mac
Output
2.0.0-rc.2 2.0.0-rc.11 2.0.0+linux 2.0.0+mac

2 sorts numerically before 11. The two build-labelled releases have equal precedence and retain their input order.

What happens to your data

The browser sorts versions locally. Optional usage measurement excludes version strings, release candidates and build labels.

Last updated November 2026

Order a list of software releases by their actual Semantic Versioning precedence. Paste versions one per line and sort from lowest to highest or reverse the order. The SemVer Sorter understands releases, numbered pre-releases and build metadata. It preserves the original version strings, keeps duplicates and reports the specific line if a version is invalid.

How it works

Semantic Versioning compares major, minor and patch in that order. Each component compares numerically, so 1.10.0 sorts after 1.2.0. For the same core version, the normal release ranks above pre-releases. Pre-release identifiers compare left to right. Numeric identifiers compare numerically and rank below identifiers with letters or hyphens, which compare in ASCII order. If all shared identifiers match, the version with more pre-release identifiers has higher precedence.

Build metadata after a plus sign stays in the output but does not affect precedence. Equal-precedence entries retain input order in either sort direction, including duplicates and entries that differ only in their build label. Comparison works with the digit strings themselves, so long numeric identifiers do not lose precision through JavaScript number conversion.

The input accepts strict SemVer 2.0 version strings such as 1.4.0-rc.2+build.5. A Git tag with a leading v, an incomplete version like 1.4 or a range like ^1.4.0 needs editing before sorting. Blank lines and surrounding whitespace are ignored. The limits are 2,000 nonblank versions, 256 characters per trimmed line and 128,000 input characters total. Use the result to review release order. Package availability and dependency-range resolution depend on your package manager and are outside this tool.

Worked example: Sort numbered release candidates before the release

Input
2.0.0+linux 2.0.0-rc.11 2.0.0-rc.2 2.0.0+mac
Result
2.0.0-rc.2 2.0.0-rc.11 2.0.0+linux 2.0.0+mac

2 sorts numerically before 11. The two build-labelled releases have equal precedence and retain their input order.

Common use cases

  • Sort release tags after removing their leading v prefix.
  • Check the order of release candidates such as rc.2 and rc.11.
  • Keep platform build labels while ordering a release list.
  • Find malformed or incomplete version strings in a pasted manifest list.

Frequently asked questions

Why does 1.10.0 rank above 1.2.0?+

Minor versions compare as integers. Ten is greater than two even though the first digit of 10 is smaller.

What happens to build labels after a plus sign?+

Build labels stay in their original version strings. SemVer excludes them from precedence, so otherwise equivalent versions retain input order.

Does a release rank above its release candidate?+

Yes. For the same major, minor and patch, the release 1.2.3 ranks above 1.2.3-rc.9.

Can I paste npm ranges or v-prefixed tags?+

This sorter expects concrete strict SemVer strings. Remove v from a Git tag and expand or resolve package manager ranges separately.

What happens if one line is invalid?+

The result is withheld and the first invalid line is identified. Correct that entry and sort again to avoid dropping releases silently.