Glossary · Programming

Semantic Versioning (SemVer)

Semantic versioning is a numbering scheme, MAJOR.MINOR.PATCH, where each part signals whether a release has breaking changes, features or only fixes.

Updated October 6, 2026

Semantic versioning (SemVer) labels releases with three numbers, MAJOR.MINOR.PATCH, such as 2.4.1. Increase MAJOR for incompatible changes, MINOR for new features that remain backward compatible, and PATCH for backward-compatible bug fixes.

Why it matters

Version numbers tell users how risky an upgrade is. A move from 2.4.1 to 2.4.2 should be safe, 2.4.1 to 2.5.0 adds features, and 2.4.1 to 3.0.0 may require changes in your code. Package managers use these rules to choose compatible versions automatically.

Example

ChangeOldNew
Fix a crash2.4.12.4.2
Add an optional parameter2.4.22.5.0
Remove a function2.5.03.0.0

In npm, ^2.4.1 accepts any 2.x.x release at or above 2.4.1, while ~2.4.1 accepts only 2.4.x patches.

Common mistakes

  • Making a breaking change in a minor or patch release, which breaks users who trusted the rules.
  • Treating 0.x versions as stable; under SemVer anything may change before 1.0.0.
  • Assuming every project follows SemVer; check the changelog before upgrading.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.