How to use it
- Type a Version, such as 1.4.0, and optionally a Compare with version to order it against.
- Choose a Bump to see the next version. For a Pre-release bump, name the pre-release in Pre-release name.
- Type a Range to check whether the version satisfies it, and read How the range reads to see what each part of it means.
- Read Bumped version, Order and Range check for the answer you need.
How versions are ordered
SemVer 2.0.0 compares the major, minor and patch numbers as numbers. A version with a pre-release tag comes before the same version without one. Pre-release identifiers are compared one by one: numbers as numbers, text in ASCII order, and a number before text. Build metadata, the part after +, does not count.
- The order of the examples in the specification: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-alpha.beta, 1.0.0-beta, 1.0.0-beta.2, 1.0.0-beta.11, 1.0.0-rc.1, 1.0.0.
- A leading v, as in v1.4.0, is accepted and is not part of the version.
How a bump works
A major bump raises the first number and sets the other two to 0. A minor or patch bump does the same for its part. A version that is still a pre-release loses its tag when the bump would raise the release anyway: 1.0.0-alpha becomes 1.0.0 with a major bump, as node-semver does. A pre-release bump starts the next patch with the name you give, such as 1.4.1-beta.0, or counts up the last number of an existing pre-release, such as beta.1 to beta.2.
How the ranges are read
The range syntax follows node-semver, the package npm uses, and its README grammar. Each form stands for comparators: ^1.3.0 means >=1.3.0 <2.0.0-0, ~1.2.3 means >=1.2.3 <1.3.0-0, and 1.2.x means >=1.2.0 <1.3.0-0. The comparators inside one set must all hold. Sets joined by || are alternatives, and an empty set accepts any version, as * does.
Pre-releases and ranges
A pre-release version such as 1.5.0-beta.1 satisfies a range only when one of the comparators in its set has the same 1.5.0 with a pre-release tag. Unfinished versions therefore stay out of ranges by default, as node-semver's README explains. The check on this page follows that rule.
Worked example: 1.4.0 with a minor bump and ^1.3.0 || 2.x
Version 1.4.0 is higher than 1.4.0-beta.2, because a release is higher than its pre-release. A minor bump gives 1.5.0. The range ^1.3.0 || 2.x reads as >=1.3.0 <2.0.0-0 or >=2.0.0 <3.0.0-0, and 1.4.0 satisfies the first set.
| Input | Result |
|---|---|
| 1.4.0 compared with 1.4.0-beta.2 | 1.4.0 is higher than 1.4.0-beta.2. |
| Minor bump of 1.4.0 | 1.5.0 |
| 1.4.0 in ^1.3.0 || 2.x | 1.4.0 satisfies ^1.3.0 || 2.x. |
Frequently asked questions
Is 1.0.0+build.1 the same version as 1.0.0?
For ordering and ranges, yes. The build metadata after + does not count in SemVer precedence, so the two versions have the same place in an order. The page still shows the build text so that you can see it.
Why is 1.4.0-beta.2 lower than 1.4.0?
A pre-release is unstable and may not meet the compatibility that its number promises, so SemVer places it before the release with the same numbers. Therefore 1.4.0-beta.2 comes before 1.4.0, and 1.4.0 comes before 1.4.1.
Does ^1.3.0 accept 2.0.0?
No. A caret range keeps the left-most non-zero number, so ^1.3.0 means at least 1.3.0 and below 2.0.0. Write || 2.x as well if the second major should be accepted, as the example does.
What is the difference between ~1.2 and ^1.2?
The tilde range ~1.2 means >=1.2.0 <1.3.0-0, so it accepts patch changes such as 1.2.9 and rejects 1.3.0. The caret range ^1.2 means >=1.2.0 <2.0.0-0, so it also accepts 1.3.0 and 1.9.9, but not 2.0.0.
Why does a range reject 1.5.0-beta.1?
Pre-releases are left out unless a comparator names the same version with a pre-release tag, such as >=1.5.0-beta.0. node-semver makes this choice because pre-releases change quickly and may break things.
Are my versions sent to a server?
No. The version, the range and the comparison are read and checked in your browser, and nothing you type is stored.
Sources
- Semantic Versioning 2.0.0, the specification
- node-semver README: ranges and the range grammar (npm)
- node-semver README: prerelease tags (npm)
- node-semver repository, ISC licence (npm)
Figures and text last checked on Tuesday, November 10, 2026.