Semantic Versioning

Semantic version calculation and comparison, following the SemVer 2.0 specification.

Version Bump

Major (MAJOR)
Incompatible API changes
Minor (MINOR)
Backward-compatible features
Patch (PATCH)
Backward-compatible bug fixes
Prerelease Identifiers (Quick Select)
alpha
Alpha
Internal test build, incomplete features, likely has many bugs
beta
Beta
Public test build, mostly complete features, may have few bugs
rc
Release Candidate
Release candidate, complete feature set, can become stable after testing
dev
Development
In-development version, unstable, for development only
preview
Preview
Preview version, showcases new features, may be unstable
pre
Pre-release
Pre-release version, refers to any version before official release

Version Comparison

=

Version Range Check

SemVer Specification

Semantic version format: MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD]

  • MAJOR — Incremented for incompatible API changes
  • MINOR — Incremented for backward-compatible feature additions
  • PATCH — Incremented for backward-compatible bug fixes
  • PRERELEASE — Prerelease identifier (e.g., alpha, beta, rc.1)
  • BUILD — Build metadata (e.g., +build.123)

Prerelease Identifier Details

Prerelease identifiers are appended after the PATCH version with a hyphen, indicating lower priority than the stable release. Identifiers can use dots as separators; numeric segments are compared numerically, alphabetic segments by ASCII order.

IdentifierFull NameCommon UseExample
alphaAlphaInternal test build, incomplete features, likely has many bugs1.0.0-alpha
betaBetaPublic test build, mostly complete features, may have few bugs1.0.0-beta.2
rcRelease CandidateRelease candidate, complete feature set, can become stable after testing1.0.0-rc.1
devDevelopmentIn-development version, unstable, for development only1.0.0-dev
previewPreviewPreview version, showcases new features, may be unstable1.0.0-preview
prePre-releasePre-release version, refers to any version before official release1.0.0-pre.1

Priority order: alpha < beta < rc < release (e.g. 1.0.0-alpha < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0)

Range Syntax

  • ^1.2.3 — Compatible with 1.2.3 (≥1.2.3, <2.0.0)
  • ~1.2.3 — Approximately 1.2.3 (≥1.2.3, <1.3.0)
  • >=1.0.0 <2.0.0 — Interval range
  • 1.x — Wildcard (≥1.0.0, <2.0.0)

Usage Guide

Features

The semantic versioning tool follows the SemVer 2.0 spec and supports version parsing, major/minor/patch bump preview and one-click upgrade, prerelease identifier quick selection (alpha/beta/rc/dev/preview/pre, click to write and support auto-incrementing), two-version comparison, and common range expression validation (^, ~, >=) for package management scenarios like npm and Cargo.

Steps

Enter a MAJOR.MINOR.PATCH version in the "Current Version" field. Below it shows parsed major/minor/patch and three bump previews; click a card to upgrade. For prerelease identifiers, click the quick-select buttons (alpha/beta/rc/dev/preview/pre), which auto-increment on repeated clicks (e.g., alpha → alpha.1 → alpha.2). Or enter a custom ID and press Enter or click "Add Prerelease". In "Version Comparison", enter two versions to see their relationship. In "Range Check", enter a version and a range expression (e.g., ^1.2.0) to verify.

Range Syntax Notes

^1.2.3 means compatible version, allowing any upgrade within the same major (≥1.2.3 and <2.0.0); ~1.2.3 means approximately, only allowing minor upgrades (≥1.2.3 and <1.3.0); >=1.0.0 <2.0.0 is an interval range; 1.x is wildcard notation. Prerelease versions (with -alpha etc.) have lower priority than stable releases.

Notes

This tool implements simplified SemVer comparison: build metadata (+build.123) is parsed but not compared; complex range expressions (e.g., || or combinations) are not supported; versions must be in X.Y.Z three-segment numeric format or they will be rejected; different package managers (npm, pip, cargo) may have subtle differences in range definitions. For production, validate with the corresponding tool.