Random Semver Version Generator
Generates valid semantic version numbers for testing release tooling and changelogs
About this generator
Version comparison bugs are common and annoying to track down: does your sort handle 1.10.0 > 1.9.0 correctly? Does your parser choke on 0.0.1? Does your release script misorder a pre-release tag? This generator produces valid semantic version strings — MAJOR.MINOR.PATCH — you can feed directly into version-comparison logic, changelog tooling, mock package registries, or documentation without hand-typing dozens of plausible numbers. The count input generates between 1 and 50 version strings per run. The pre-release toggle, when enabled, appends alpha.N, beta.N, or rc.N tags to roughly half the generated versions — producing values like 2.4.0-beta.1 or 0.1.0-rc.3. These are the cases where version-ordering bugs are most likely to surface, because a pre-release version must sort before its stable counterpart: 2.0.0-rc.1 < 2.0.0. Every generated value follows the SemVer specification, so it parses cleanly in node-semver, Python's packaging.version, and Cargo's semver crate. For a stress test, generate 50 versions with pre-release enabled, sort them with your tooling, and verify the result against the expected order.
How to use
- Set how many version numbers you need for your test or fixture.
- Toggle pre-release tags on if you want values like 1.2.0-beta.3 in the mix.
- Click Generate to produce the list of valid SemVer strings.
- Copy the whole batch into your test fixture, mock registry, or documentation.
Use Cases
- •Testing version-comparison and sort logic against many realistic inputs
- •Seeding a mock package registry or release history
- •Verifying changelog and release-automation tooling
- •Fixtures for tests that parse or validate SemVer strings
- •Documentation examples that need plausible version numbers
Tips
- →Enable pre-release tags specifically when testing sort order — that is where most version bugs surface.
- →Generate a large batch to stress-test how your parser handles two- and three-digit components.
- →Pair with a changelog or commit generator to build a realistic release history.
- →For production version bumps, derive the number from your actual release process rather than a random tool.
FAQ
what is semantic versioning
Semantic versioning (SemVer) is a convention of MAJOR.MINOR.PATCH, where MAJOR marks breaking changes, MINOR adds backward-compatible features, and PATCH covers backward-compatible fixes. An optional pre-release tag like -beta.1 marks an unstable build that sorts before the matching stable release.
are the generated versions valid semver
Yes. Every value follows the SemVer format, including optional pre-release identifiers when you enable them, so they parse cleanly in libraries like node-semver and pass validation in package tooling.
why include pre-release tags in the output
Pre-release tags such as -alpha, -beta, and -rc are where version-ordering bugs hide, because they must sort before the stable version. Enable them to confirm your comparison logic handles 2.0.0-rc.1 < 2.0.0 correctly, which is a common edge case that pure MAJOR.MINOR.PATCH testing misses.
what pre-release tags does the generator produce
With pre-release enabled, the generator randomly appends one of three tags — alpha.N, beta.N, or rc.N — where N is a number from 1 to 5. About half the versions in a batch receive a pre-release tag; the rest remain stable MAJOR.MINOR.PATCH values, giving you a mixed set to test against.
You might also like
Popular tools from other categories that share themes with this one.