Esta página aún no está traducida al español, así que la mostramos en inglés.

Semantic Version Calculator — Compare, Bump & Test Ranges

Everything about semantic versions in one place: compare two versions, calculate the next major/minor/patch/prerelease, and see exactly which versions an npm range like ^1.2.0 or ~2.3 allows — explained in plain English.

Actualizado el

Compare

Bump

Range check

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: Semantic Version Calculator

  1. Compare: enter two versions to see which is newer and why (prerelease and build metadata included).
  2. Bump: enter the current version and click the change type to get the next version — copied automatically.
  3. Range check: enter an npm range like ^1.2.0, ~1.2, 1.x or >=1.2 <2 and a list of versions.
  4. Read the plain-English explanation and see which versions satisfy the range.

Semantic versioning: MAJOR.MINOR.PATCH

PartIncrease when…Example
MAJORyou make breaking changes1.4.2 → 2.0.0
MINORyou add features, backwards-compatible1.4.2 → 1.5.0
PATCHyou fix bugs, backwards-compatible1.4.2 → 1.4.3
Prereleaseyou publish a test version2.0.0-beta.1
Build metadatayou tag a build (ignored for precedence)1.4.2+sha.5114f85

npm range cheat sheet

RangeMeansAllows
^1.2.3Compatible with 1.2.3>=1.2.3 <2.0.0
^0.2.3For 0.x, minor is “major”>=0.2.3 <0.3.0
~1.2.3Patch updates only>=1.2.3 <1.3.0
1.x / 1Any 1.y.z>=1.0.0 <2.0.0
1.2.3 - 2.3Hyphen range>=1.2.3 <2.4.0
>=1.2 <1.5 || 2.xEither set1.2.0–1.4.x or 2.x

Prereleases only match a range if a comparator in the same set has a prerelease on the same major.minor.patch — so ^1.2.0 does not match 1.3.0-beta.1, but ^1.3.0-beta.0 does. This avoids installing unstable versions by accident.

Ranges live in your package.json. To decide the next version from your commits, use the Changelog Generator; to tag the release, the Git Command Generator.

También se busca como: semver calculator, semver range checker, npm version range, caret vs tilde, semantic versioning, version bump, compare versions, semver prerelease.

Herramientas que combinan con: Semantic Version Calculator

  • Generador de flujos de trabajo de GitHub Actions — Elige tu pila, tus desencadenantes y tus pasos, y obtén un .github/workflows/ci.yml — instalación, caché, lint, pruebas, compilación, una matriz de versiones y, si quieres, una implementación en GitHub Pages, Vercel o un registro de contenedores.
  • Number Base Converter — Type a number in any base and see it in all the others instantly.
  • Comprobador de diferencias — Pega la versión original y la modificada para ver, una al lado de la otra, las líneas añadidas, eliminadas y modificadas, con las palabras exactas que han cambiado resaltadas dentro de cada línea.
  • YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.

Preguntas frecuentes

Can I use this as a semver tester?
Yes. Enter a range such as ^1.2.0, ~2.3 or >=1.0 <2.0 and a list of versions: each version is marked as matching or not, with a plain-English explanation of the range.
What is the difference between ^ and ~ in package.json?
^1.2.3 allows minor and patch updates (up to, but not including, 2.0.0). ~1.2.3 allows only patch updates (up to 1.3.0). For 0.x versions, ^ is stricter: ^0.2.3 only allows 0.2.x.
Is 1.10.0 newer than 1.9.0?
Yes. Each part is compared as a number, not as text, so 10 > 9.
How do prerelease versions compare?
A prerelease is lower than the normal version: 2.0.0-beta.1 < 2.0.0. Prerelease identifiers are compared part by part — numbers numerically, text alphabetically, and numbers rank lower than text.
Does build metadata (+build) matter?
No, build metadata is ignored when comparing versions: 1.0.0+20261026 and 1.0.0+abc are equal in precedence.
¿Puedo instalar Semantic Version Calculator como aplicación web y utilizarla sin conexión?
Sí. Semantic Version Calculator es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas