SemVer Calculator — Free Online Tool
Calculate semantic version bumps and validate npm version range compatibility instantly.
Version Bump Calculator
Version Range Checker
Version History — Simulate Bumps
What is Semantic Versioning?
Semantic Versioning (SemVer) is a versioning specification that uses a three-number format: MAJOR.MINOR.PATCH (e.g., 2.4.1). It provides a standard way to communicate the nature of changes in each release, helping developers understand what to expect when they update a dependency.
The SemVer specification (semver.org) defines clear rules: increment MAJOR for breaking changes, MINOR for new backwards-compatible features, and PATCH for backwards-compatible bug fixes.
When to Bump Each Version Part
- MAJOR (breaking change): Removed a public API method, changed function signatures, deprecated and removed old behavior, changed authentication flow.
- MINOR (new feature): Added a new endpoint, added optional parameters to existing functions, added new configuration options.
- PATCH (bug fix): Fixed a crash, corrected incorrect behavior, performance improvement with no API change, documentation fix.
npm Version Range Syntax
^1.2.3— Compatible with 1.2.3. Allows MINOR and PATCH updates (>=1.2.3 <2.0.0)~1.2.3— Approximately equivalent. Allows only PATCH updates (>=1.2.3 <1.3.0)>=1.2.3 <2.0.0— Explicit range, very clear intent1.x— Any version with major version 1*— Any version (dangerous for production)1.2.3— Exact version only (no updates)
Frequently Asked Questions about Semantic Versioning
What is the difference between ^1.0.0 and ~1.0.0 in npm?
The caret (^) allows compatible updates within the same major version: ^1.0.0 permits any version >=1.0.0 and <2.0.0, allowing both minor and patch updates. The tilde (~) is more restrictive: ~1.0.0 allows only patch updates, matching >=1.0.0 and <1.1.0. npm uses caret (^) as the default. Use tilde when you need tighter control over what versions are installed.
When should I increment the major version number?
Increment major (e.g., 1.x.x → 2.0.0) only for breaking changes that are not backwards-compatible with the previous version. This includes: removing or renaming a public API method, changing a function's parameter signature, dropping support for a previously supported runtime or environment, or changing default behavior that breaks existing integrations. Non-breaking additions always go to minor, and bug fixes always go to patch.
What does a version number starting with 0 mean?
Versions starting with 0 (e.g., 0.x.x) signal that the software is in initial development and the public API is not yet stable. Under SemVer, anything may change at any time during 0.x development — including breaking changes with minor version bumps (0.1.0 → 0.2.0). Only increment to 1.0.0 when you are ready to commit to a stable, documented public API that you will maintain backwards-compatibility for.
How do I release a prerelease version using SemVer?
Append a prerelease identifier after a hyphen: 1.0.0-alpha.1, 1.0.0-beta.2, 1.0.0-rc.1. Prerelease versions have lower precedence than the release: 1.0.0-alpha < 1.0.0-beta < 1.0.0-rc.1 < 1.0.0. In npm, publish prereleases with npm publish --tag next so they are not installed by default. Caret and tilde range selectors do not match prerelease versions automatically.
Related Developer Tools
- Git Command Finder — free online tool at devbit.dev
- Docker Compose Generator — free online tool at devbit.dev
- Cron Expression Explainer — free online tool at devbit.dev
- View all free developer tools