# Semver Checker

Check, compare and sort semantic versions, and test them against npm style ranges such as ^1.2.0, ~2.4, >=1.0.0 <2.0.0, 1.x or 1.2.3 - 2.3.4. The checker follows the Semantic Versioning 2.0.0 rules for pre-releases and build metadata and the same range rules as npm's semver package, shows what a range expands to and finds the highest version that satisfies it.

## Frequently asked questions

### What does the checker do?

It parses every version you enter, says whether it is a valid semantic version, sorts the valid ones, names the highest and, when you enter a range, tells you which versions satisfy it and which is the highest that does. With exactly two versions it also says which one is higher.

### What does ^1.2.3 mean?

The caret allows changes that do not modify the leftmost non-zero number. ^1.2.3 means >=1.2.3 <2.0.0, ^0.2.3 means >=0.2.3 <0.3.0 and ^0.0.3 means only 0.0.3. It is npm's default when you install a package.

### What does ~1.2.3 mean?

The tilde allows patch updates: ~1.2.3 means >=1.2.3 <1.3.0. With only a major version, ~1 means >=1.0.0 <2.0.0. Use it when you want bug fixes but no new minor features.

### Which range syntaxes are supported?

Comparators (<, <=, >, >=, =), caret and tilde ranges, X-ranges such as 1.x, 1.2.* and *, partial versions such as 1.2, hyphen ranges such as 1.2.3 - 2.3.4, several comparators separated by spaces that must all match, and alternatives separated by ||.

### How are pre-release versions compared?

A pre-release such as 1.0.0-beta.2 is lower than the release 1.0.0. Pre-release identifiers are compared one by one: numbers numerically, text alphabetically and a number is always lower than text, so 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0.

### Why does 2.0.0-beta not satisfy ^1.2.0?

Following npm, a pre-release only satisfies a range when one of the range's comparators names a pre-release of the same major, minor and patch version, so ranges do not pull in unstable versions by accident. Turn on Include pre-releases to let them match like normal versions; as in npm, the lower bounds of partial and hyphen ranges then include pre-releases too.

### What is the range expansion?

The checker shows the range as the plain comparators it stands for, for example ^1.2.3 = >=1.2.3 <2.0.0-0. The -0 suffix means the bound excludes the pre-releases of 2.0.0 as well, exactly as npm's semver package writes it.

### Is build metadata compared?

No. Semantic Versioning ignores build metadata, the part after a plus sign, when comparing, so 1.0.0+build.1 and 1.0.0+build.2 are equal. The checker shows the metadata but does not use it for sorting or ranges.

### Are versions with a leading v accepted?

Yes. A leading v is ignored, so v1.2.3 is read as 1.2.3, as npm does. Versions with fewer than three numbers, such as 1.2, are not valid versions, but they work inside ranges, where 1.2 means any 1.2.x version.

### How many versions can I check?

Up to 200 versions per request, one per line, and a range of up to 1,000 characters.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
