Semver Version Bump
See what a major, minor, patch or prerelease bump produces. Free, and runs entirely in your browser — nothing you enter is uploaded or stored.
About Semver Checker
Semantic versioning puts meaning in the three numbers: MAJOR breaks things, MINOR adds things, PATCH fixes things. A range in package.json says which of those changes a project accepts. The ranges are compact, and it is easy to misread them.
The ranges are expanded to what they actually allow. ^1.2.3 means at least 1.2.3 and below 2.0.0. ^0.2.3 means below 0.3.0, because below 1.0 the minor version is treated as the breaking one. ~1.2 means below 1.3.0. The comparators are shown the way npm stores them, and each set is also described in words.
The rule that catches everyone is prereleases. 2.0.0-beta.1 does not satisfy >=1.0.0, even though it is numerically higher, because npm only installs a prerelease when the range names a prerelease of that same release. The result says when that is why a version was excluded. Sorting follows semver precedence, so 1.10.0 comes after 1.9.0, and bumping shows what npm version would produce.
Where it helps
- Follows node-semver's grammar: caret, tilde, x-ranges, hyphen ranges, comparator sets and || alternatives.
- Applies npm's prerelease rule, and says when a prerelease was excluded because of it.
- Shows the expanded comparators and a plain description, which settles what a range really accepts.
- Sorts by precedence, with numeric and alphanumeric prerelease identifiers compared the way the specification says.
- Shows what every npm version bump would produce, including the pre bumps with a label.
Limits
- It follows npm's rules. Cargo, Composer and other ecosystems read some operators differently: a bare version in Cargo means a caret range, for example.
- It checks the versions you give it, and does not look up which versions of a package have been published.
Frequently asked questions
What is the difference between ^ and ~?
Caret allows any change that does not alter the leftmost non-zero number, so ^1.2.3 allows 1.x. Tilde allows only patch changes when a minor version is given, so ~1.2.3 allows 1.2.x. Below 1.0 the caret narrows: ^0.2.3 allows only 0.2.x.
Why doesn't my prerelease satisfy the range?
npm lets a prerelease through only when a comparator in the same set names a prerelease of the same major.minor.patch. >=1.0.0 does not match 2.0.0-beta.1, but >=2.0.0-beta.0 does. This stops a range from quietly installing unstable versions. Turn on Include prereleases to see what would match if they were allowed.
What does the -0 in <2.0.0-0 mean?
It is the lowest possible prerelease of 2.0.0. Writing the upper bound this way means below 2.0.0 and below every prerelease of 2.0.0, so ^1.2.3 cannot let in 2.0.0-alpha.
Does build metadata such as +build.5 matter?
Not for ordering. The specification says build metadata is ignored for precedence, so 1.0.0+a and 1.0.0+b are equal. It is kept in the version string for information only.
Related tools
- Structure Validator — Check JSON, XML, YAML, TOML, TOON or HCL and report structural problems
- Regex Tester — Test patterns, inspect groups and preview replacements
- Text Comparison — Line-by-line diff of two blocks of text
- Structure Compare — Diff two JSON, XML, YAML, TOML, TOON or HCL documents by path
- HTML Formatter — Indent and tidy HTML markup
- CSS Formatter — Format stylesheets with consistent indentation
More Web Development tools
- HTML Formatter — Indent and tidy HTML markup
- CSS Formatter — Format stylesheets with consistent indentation
- JavaScript Formatter — Re-indent JavaScript and TypeScript source
- SCSS/SASS Formatter — Format SCSS syntax and nested rules
- TypeScript Formatter — Format TypeScript source code
- SQL Formatter — Format SQL statements with dialect selection
- SQL Minifier — Collapse formatted SQL into compact text
- CSS Unit Converter — px, rem, em, percentages and viewport units, with a preview
- Query String Parser and Builder — Convert query strings into editable key-value data
- CSP Generator — Build a Content-Security-Policy, or check one, and write it for your server or framework
- CORS Generator — Write CORS configuration for nginx, Express, Go, Django, ASP.NET, Spring and more, and test an origin against it
- cURL Builder — Build an HTTP request and get it as curl, JavaScript, TypeScript, Go, Python, PHP, C#, Java and more
- Minifier — Shrink CSS, HTML or JavaScript
- Flexbox Playground — Try every flex property and read the CSS back
- CSS Grid Playground — Build a grid template and see the tracks it makes
- Responsive Viewport Tester — Render your markup at phone, tablet and desktop widths
- SVG Path Viewer — Draw path data and read back what it contains
- SVG to CSS Converter — Turn an SVG into a data URI for CSS or an img tag
- OAuth 2.0 / OIDC Helper — PKCE verifiers and challenges, state, nonce, and checking what came back
- Regex Tester — Test patterns, inspect groups and preview replacements
- User-Agent Parser — Identify the browser, engine, operating system and device behind a User-Agent string
- HTTP Status Codes — Look up what a status code means, when to send it, and whether it is cached or safe to retry
- HTML to JSX — Convert HTML and SVG markup into JSX for React, with styles, attributes and whitespace handled
- Semver Checker — Test versions against npm ranges, sort them by precedence, and see what each bump produces
- Cookie Parser and Builder — Read Set-Cookie and Cookie headers, check them against browser rules, and write one for your framework