Semver Calculator
Compare two versions, bump a version, or check whether a version fits an npm-style range like ^1.2.3.
How it works
Semantic versioning writes versions as MAJOR.MINOR.PATCH (for example 1.4.2). The tool compares two versions, bumps a version, and checks whether a version fits an npm style range such as ^1.2.3 or ~1.2.0. Prerelease tags like 1.0.0-beta.1 sort before the final release.
Worked example
1.2.3 compared with 1.10.0: the minor number 10 is bigger than 2, so 1.10.0 is newer. ^1.2.3 allows 1.2.3 up to but not including 2.0.0.
Good to know
- Major changes break things, minor adds features without breaking, patch fixes bugs.
- ^1.2.3 means compatible with 1.2.3. ~1.2.3 allows only patch updates.
- 1.0.0-alpha < 1.0.0-beta < 1.0.0.
Common questions
- Why is 1.10.0 newer than 1.9.0?
- Numbers are compared as numbers, not as text.
- What does ^0.2.3 allow?
- For 0.x versions the caret allows only patch changes, so 0.2.3 up to 0.3.0.
- Is build metadata (+build) compared?
- No, it is ignored for ordering.
More in Developer.
See the ASCII code of every character in decimal, hex, binary and octal, or turn codes back into text.
OPEN →Axios Request GeneratorFill in a method, URL, headers and body and get a ready Axios Request snippet to copy.
OPEN →Base32 Encoder and DecoderEncode text to Base32 (RFC 4648) or decode it, as used in 2FA secrets.
OPEN →