+3 more fields
DevOps & Development Experts
From CI/CD pipelines to custom applications, our team builds secure solutions that scale.
What Is Semantic Versioning
Semantic Versioning (SemVer) is a versioning convention that communicates the nature of changes between software releases through a structured three-part version number: MAJOR.MINOR.PATCH. By following SemVer, package authors tell consumers exactly what to expect from an upgrade — whether it will break existing integrations, add new features, or fix bugs.
SemVer (semver.org) is the standard versioning scheme for npm, Cargo (Rust), Go modules, Composer (PHP), and most modern package ecosystems. Understanding SemVer is essential for managing dependencies, writing version constraints, and making informed upgrade decisions.
SemVer Components
| Component | When to Increment | Example | Signal to Users |
|---|---|---|---|
| MAJOR (X.0.0) | Breaking changes to the public API | 2.0.0 → 3.0.0 | Code changes required to upgrade |
| MINOR (0.X.0) | New features, backward-compatible | 2.3.0 → 2.4.0 | New capabilities, existing code works |
| PATCH (0.0.X) | Bug fixes, backward-compatible | 2.4.1 → 2.4.2 | Safer to upgrade, existing code works |
Pre-release and Build Metadata
| Format | Meaning | Example |
|---|---|---|
| 1.0.0-alpha | Pre-release: unstable, may change | Testing, early access |
| 1.0.0-beta.2 | Pre-release with iteration | Beta testing |
| 1.0.0-rc.1 | Release candidate | Final testing before stable |
| 1.0.0+build.123 | Build metadata (ignored in precedence) | CI/CD tracking |
Version Ranges (npm syntax)
| Syntax | Meaning | Accepts |
|---|---|---|
| ^1.2.3 | Compatible with 1.x.x | >=1.2.3, <2.0.0 |
| ~1.2.3 | Approximately 1.2.x | >=1.2.3, <1.3.0 |
| >=1.2.3 | Minimum version | 1.2.3 and above |
| 1.2.x | Any patch version | >=1.2.0, <1.3.0 |
| * | Any version | Everything |
Common Use Cases
- Dependency management: Write correct version constraints in package.json, Cargo.toml, or requirements.txt to get updates without breaking changes
- Release planning: Determine the correct version number for your next release based on the nature of changes since the last release
- Upgrade risk assessment: Evaluate whether upgrading a dependency is safe (patch), potentially beneficial (minor), or risky (major)
- Changelog management: Organize release notes by version, helping users understand what changed and when
- CI/CD automation: Automate version bumping in CI/CD pipelines based on commit message conventions (Conventional Commits)
Best Practices
- Follow SemVer strictly — Releasing a breaking change as a minor version erodes user trust. If you change or remove public API behavior, increment the major version.
- Start at 0.1.0 for new projects — Versions below 1.0.0 signal that the API is unstable and may change without major version bumps. Release 1.0.0 when your public API is stable.
- Use caret (^) ranges for most dependencies — ^1.2.3 allows automatic minor and patch updates while preventing breaking changes. This is npm's default and the recommended approach.
- Pin exact versions for applications — Libraries should use ranges, but applications should pin exact versions (with lock files) for reproducible builds.
- Document breaking changes prominently — When releasing a major version, provide a migration guide that lists every breaking change and how to adapt.
Frequently Asked Questions
Common questions about the Semver Calculator
Semantic Versioning is a versioning scheme that uses three numbers in the format MAJOR.MINOR.PATCH. Major version changes indicate breaking changes, minor version changes add new features that are backward compatible, and patch version changes indicate bug fixes. This system helps developers communicate the impact of updates clearly.
ℹ️ Disclaimer
This tool is provided for informational and educational purposes only. All processing happens entirely in your browser - no data is sent to or stored on our servers. While we strive for accuracy, we make no warranties about the completeness or reliability of results. Use at your own discretion.