Put v1.2.0 before v1.10.0
Semantic version sorter
Sort software versions by Semantic Versioning precedence instead of ordinary alphabetical order.
Free browser tool
Sort SemVer values correctly
Paste one version per line. Stable and prerelease versions are ordered by SemVer 2.0 precedence, while build metadata does not change precedence.
Processed in your browser
Copy or download the result
No account. No signup.
How it works
How semantic version sorting works
Semantic versions compare major, minor, and patch numbers numerically, then apply special precedence rules to prerelease identifiers.
Paste one version per line
Use major.minor.patch, with optional prerelease and build parts such as 2.1.0-beta.3+build.8.
Choose the direction
Sort from oldest to newest or reverse the order for newest first.
Handle invalid entries
Isolate, append, remove, or reject lines that do not follow the supported SemVer form.
Copy the stable result
Versions with equal precedence retain their original relative order.
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
Semantic version 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, so equal-precedence entries keep their 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.