Code tool

Sort Versions

Paste one version per line and sort locally while preserving the original spelling of every valid entry.

In-browser processingNo account requiredPrivacy details ↗

Local only · accepts MAJOR.MINOR.PATCH, optional v, pre-release identifiers, and build metadata

A QUICK WALKTHROUGH

How to use this tool

  1. Paste versions, one per line.
  2. Choose the order and optional filtering.
  3. Sort, review, and copy the result.

Semantic precedence

The tool accepts exactly MAJOR.MINOR.PATCH, an optional v prefix, optional dot-separated pre-release identifiers, and optional build metadata. Pre-release versions sort before the matching final version; numeric identifiers sort numerically and are lower than non-numeric identifiers.

Local and stable

Blank lines are ignored. Invalid nonblank lines are rejected with their line number. Equal versions keep input order, and the original text—including v, casing, and build metadata—is preserved in the output.

GOOD TO KNOW

Common questions

Does build metadata affect order?

No. Build metadata after + is accepted and ignored for precedence, as in Semantic Versioning.

What happens to invalid lines?

The sort stops and reports the first invalid nonblank line, so malformed text is never silently reordered.

Are pre-releases included?

Yes by default. You can optionally exclude all versions with a pre-release identifier.