⚡
usefultools.dev
1.2.3

SemVer Calculator – Bump, Compare & Check Ranges

NOVO

SemVer calculator to parse versions, bump major/minor/patch/prerelease, compare precedence and test npm ranges like ^, ~ and ||, with the rule explained.

Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.

Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.

Parse & bump

Major
1
Minor
4
Patch
2
Pre-release
beta.1
Build
build.7
Next versions (npm version / semver.inc rules; build metadata is dropped)
major2.0.0
minor1.5.0
patch1.4.2
premajor2.0.0-beta.0
preminor1.5.0-beta.0
prepatch1.4.3-beta.0
prerelease1.4.2-beta.2

Compare two versions

1.0.0-alpha.1 < 1.0.0-alpha.beta

Pre-release identifier #2: "1" < "beta" — a numeric identifier ranks lower than an alphanumeric one.

Check a range

✓ Satisfies the range
  1. ^1.2.3 → >=1.2.3 <2.0.0-0 (caret keeps the major version fixed)

    ✓ >=1.2.3✓ <2.0.0-0

    Set 1: matches

  2. >=2.0.0; <2.5.0

    ✗ >=2.0.0✓ <2.5.0

    Set 2: no match

⚡

Exemplos rápidos

Entradas típicas e os resultados que esta ferramenta gera.

Bump
1.4.2 minor
1.5.0
Bump
1.4.2 prerelease beta
1.4.3-beta.0
Bump
2.0.0-rc.1 prerelease
2.0.0-rc.2
Compare
1.0.0-beta.2 vs 1.0.0-beta.11
<
Range
0.3.0 in ^0.2.3
No (<0.3.0-0)
📖

Visão geral

This SemVer calculator answers the everyday versioning questions: what is the next version, which of two versions is newer, and does a version match a dependency range. It follows Semantic Versioning 2.0.0 for parsing and precedence, and npm's rules for bumps and ranges.

Bumps use the same logic as npm version, including pre-release counters such as 1.4.3-beta.0. Comparison explains the deciding rule, for example that beta.2 sorts before beta.11 because numeric identifiers compare as numbers. Range checks expand caret, tilde, x-ranges, hyphen ranges and || into plain comparators and show which one passed or failed.

All calculations run in your browser.

Por que usar esta ferramenta?

  • Know the next version before tagging
  • Understand why ^0.2.3 rejects 0.3.0
  • Correct pre-release precedence
  • Each rule explained, not just a yes/no
⭐

Recursos

🔎

Strict parser

Validates SemVer 2.0.0 including pre-release and build metadata.

⬆️

All bump types

major, minor, patch, premajor, preminor, prepatch and prerelease with an identifier.

⚖️

Precedence compare

Compares two versions and names the rule that decided it.

🎯

npm ranges

Supports ^, ~, x/*, comparators, hyphen ranges and || sets.

🧪

Pre-release rule

Applies npm's rule that pre-releases only match ranges on the same x.y.z.

📋

Copy results

Copy any bumped version with one click.

🛠️

Como usar

1

Enter a version

Type it in "Version"; the parts and all bumps appear at once.

2

Set a pre-release id

Optionally type alpha, beta or rc in "Pre-release id" for pre-bumps.

3

Compare

Fill Version A and Version B to see which ranks higher and why.

4

Check a range

Enter a version and an npm range to see the expanded comparators.

🤔

Perguntas frequentes