SemVer compare & sort
ClientCompare two Semantic Versioning strings or sort a list of versions using SemVer 2.0.0 precedence—core numbers first, then prerelease identifiers. Optional v prefix is accepted.
Compare two versions
?
Uses Semantic Versioning 2.0.0 rules: core numeric parts, then prerelease identifiers. Build metadata (+…) is ignored for ordering.
Try examples
Sort a list
One SemVer per line—invalid lines are kept at the bottom in their original order.
Paste at least one non-empty line to see a sort.
Common use cases
- Decide whether 1.2.3-rc.1 should ship before 1.2.3 when reading release notes.
- Sort package or image tags from a spreadsheet before publishing or tagging.
- Pair with timestamps when correlating builds with calendar dates in changelogs.
Common mistakes to avoid
Treating build metadata (+…) as part of precedence
Build is ignored for version ordering—only core and prerelease matter for SemVer 2.0.0.
Assuming every ecosystem uses strict SemVer
CalVer, date-based tags, and custom schemes exist—this tool only applies SemVer-shaped strings.
Using lexicographic string sort for versions
String sort puts 2.0.10 before 2.0.2—always use SemVer rules for numeric core parts.
FAQ
Are versions sent to Toolcore?
No. Parsing and sorting run entirely in your browser.
Why is my version invalid?
Core parts must be non-negative integers without leading zeros. Prerelease identifiers follow SemVer 2.0.0 grammar.
Does this validate npm ranges like ^1.0.0?
No. This page compares exact version strings. Range operators are not implemented here.
More tools
Related utilities you can open in another tab—mostly client-side.
HTTP methods
ClientGET, POST, PUT, PATCH, DELETE—safe, idempotent, body usage—quick reference for APIs, client-side.
HTTP status codes
ClientHTTP response status reference: search 1xx–5xx, short meanings, copy status lines—client-side.
Unix timestamp converter
ClientEpoch to date: seconds, milliseconds, ISO-8601, UTC and local time—in browser.
JSON formatter
ClientJSON format online: pretty-print, minify, validate, escape, download .json.