Menu

Guidefor developers4 min read

Which Minecraft version is newer, 26.2 or 1.21.11?

Text comparison says 1.21.11 wins. Release order says 26.2 does. Why every naive version sort broke in 2026, and how to order both eras correctly in your own code.

Why every version sorter broke in 2026

Run this and see what you get:

["26.2", "1.21.11"].sort()
// ["1.21.11", "26.2"]

Wrong. 26.2 shipped in 2026 and 1.21.11 shipped in December 2025, so 26.2 is newer. String comparison put 1 before 2 and produced the opposite answer.

Semantic version parsers do no better, because they are working correctly on the wrong assumption. To a semver parser, 26.2 has a major of 26 and 1.21.11 has a major of 1, so 26.2 is newer. That happens to be right here, but only by accident: the same parser will tell you 1.21.11 is newer than 1.21.9, which is true, and that 1.9 is newer than 1.10, which is not, if it is treating the parts as text.

The underlying problem is that Minecraft version names have never been a sortable key. They are labels. 1.21.11, 26.2, 26w14a, 1.21.11-pre1, 3D Shareware v1.34 and b1.7.3 are all real version names, and no single parsing rule orders that set correctly.

Use the manifest order

Mojang publishes a version manifest that lists every version it has ever released, in chronological order, in one array. That order is the answer. It is authoritative, it covers both naming eras, it puts snapshots and pre-releases exactly where they belong, and it needs no parsing at all.

The rule is: read the manifest once, assign each version its index, store the index, and sort on the index forever after. Never parse the name.

That index is what this site calls sortIndex, and it is the only ordering used anywhere on it. When you see a "previous version" and "next version" link on a version page, it is following that index.

// Assign once at ingest, then never think about version names again.
const manifest = await fetch("https://launchermeta.mojang.com/mc/game/version_manifest_v2.json")
  .then((response) => response.json());

// The manifest is newest first, so reverse it to get an ascending index.
const order = new Map(
  manifest.versions.map((version, index) => [version.id, manifest.versions.length - index])
);

order.get("26.2") > order.get("1.21.11"); // true, and it will stay true

Sorting by data version, and where that fails

The data version is a plain integer that Mojang increments on every version, including snapshots. It is exposed in a version's own metadata and inside every world save. If both versions you are comparing have one, comparing data versions is correct and needs no network call at runtime.

Where it fails:

  • It does not exist below 1.9. Anything older has no data version at all.
  • It is not in the manifest. You have to fetch each version's detail document to read it, which is one request per version.
  • April Fools versions have one too, and it is a real number that slots them into the middle of whatever year they were released in. That is correct behaviour, and it is probably not what you want in a release picker.

So: data version is the best runtime comparison key, and manifest order is the best ingest time key. Store both.

Never sort by protocol version

Protocol numbers look like they should work and they do not.

  • They repeat. 1.21.7 and 1.21.8 both speak protocol 772, because nothing about the network protocol changed between them.
  • Snapshots use a separate space. Snapshot protocol numbers are offset by a very large constant so they cannot be confused with release protocols. Sorting a mixed list by protocol throws every snapshot to one end.

Protocol version answers exactly one question, which is whether two builds can talk to each other. It is on every version page here for that reason and no other.

Handling snapshots, pre-releases and release candidates

Within a single release cycle the order is always:

  1. snapshots, in week order
  2. pre-releases, numbered from 1
  3. release candidates, numbered from 1
  4. the release

The manifest already has them in this order, so if you are using the manifest index you get it for free. If you are building a version picker, the useful move is to store the release a pre-release belongs to alongside its index, so you can group 26.2-pre1 through 26.2-rc1 under 26.2 and collapse them by default.

Showing two eras in one dropdown

Users do not have this problem in their heads. They know 26.2 is current and 1.20.1 is old. Where they get confused is a list that mixes the two without saying which is which.

Two things fix it:

  • Group by era, and label the groups. "2026 releases" and "1.x releases" is enough.
  • Sort descending and never renumber anything. Show the names Mojang published, in the order Mojang published them.

The version list on this site does exactly that, and the era label on each version page is stored as a field rather than guessed from the name.

Test cases every version sorter should pass

If your implementation gets all of these right, it is correct:

ComparisonCorrect answerWhat it catches
26.1 vs 1.21.1126.1 is newerthe era boundary
1.21.11 vs 1.21.91.21.11 is newernumeric, not text, comparison
1.10 vs 1.91.10 is newerthe same trap one level up
26.2 vs 26.2-rc126.2 is newercandidates precede releases
26.2-pre1 vs 26.2-rc1rc1 is newerpre-releases precede candidates
26w14a vs 26.1depends on datessnapshots interleave
1.21.7 vs 1.21.81.21.8 is newerequal protocols must not tie
b1.7.3 vs 1.01.0 is newerbeta predates release
3D Shareware v1.34not in a release listApril Fools versions

The last row is the one most implementations miss. If your sorter has to decide where 3D Shareware v1.34 goes, it is parsing names, and it will keep failing on inputs nobody predicted. Read the full version list and you will find a dozen more names no regular expression is going to survive.

Frequently asked

Can I compare data versions instead of version strings?

For releases, yes. The data version increases monotonically across the whole history and does not care which naming era a version belongs to. It is the single best numeric key you can sort on. The catch is that it only exists for versions from 1.9 onward, so anything older needs the manifest order as a fallback.

Is the protocol version always increasing?

No, and this is the trap. Protocol numbers are reused across releases that speak the same protocol, and snapshots use a separate high-bit numbering that makes them look enormous. 1.21.7 and 1.21.8 share protocol 772. Never sort by protocol.

Where do April Fools versions sit in the order?

Wherever Mojang put them in the manifest, which is their real release date. They are dated jokes, not part of any release line, so they interleave with the snapshots of that year and belong nowhere in a release-only list.

What sorts first, 26.2 or 26.2-rc-2?

The release candidate comes first, because it was published first. A release candidate is a build offered as the final version if nothing goes wrong, so it always predates the release it is a candidate for.

Referenced on this site

Last reviewed 2026-07-27. Version data on this site updates automatically; this guide is reviewed by hand when the ecosystem changes.