b2KIT

Cryptographic Random Number Generator

Generate cryptographically secure random numbers using Web Crypto API. Supports integer ranges, floats, and byte arrays.

Tested tool guide Tested browser tools Checked August 16, 2026

What Cryptographic Random Number Generator does and how it behaves

Unpredictable numeric output is the point of this generator. It uses the browser's Web Crypto facility to produce whole numbers, floating-point values, or sequences of random bytes according to the selected mode and controls. Generation occurs locally in the browser. The most important distinction is that the entered settings are constraints, not a calculation with one repeatable answer. Running the generator twice with identical settings should normally produce different results, and any particular result remains possible again.

How the result is produced

1

Randomness source

Each generation request uses the browser's Web Crypto randomness facility. There is no user-provided seed to replay. The browser and operating environment are responsible for sourcing the randomness, while the tool presents the returned values in the selected numeric or byte form. The generated material remains in the browser rather than being uploaded to a random-number service.

2

Result modes

Integer mode produces whole-number results subject to the entered limits. Floating-point mode produces numeric results that may include a fractional part. Byte-array mode produces the requested count of bytes, each an unsigned value from 0 through 255. These modes describe different result types, so a byte count should not be read as a decimal digit count.

Good uses

  • Generate an unpredictable integer for a security-sensitive draw where a repeatable sequence would be inappropriate.
  • Produce a specified number of random bytes before encoding them for use as a nonce, salt, identifier, or security test fixture.
  • Create fresh floating-point samples for an experiment that does not require deterministic replay from a seed.

Limits and checks

  • Identical settings do not identify one correct output. A copied result is only one possible draw and is unsuitable as a fixed regression expectation.
  • Cryptographically secure does not mean collision-free. Separate requests can return the same value, with the likelihood depending on the size of the possible output space.
  • Randomness does not establish protocol compliance. The chosen range, byte length, encoding, or downstream key format can still be unsuitable for its intended system.

Common questions

Can I use the output as an encryption key?

Not by itself in every case. Byte output can provide cryptographically strong random material, but an encryption scheme may require an exact key size, structure, import format, or dedicated key-generation operation. Follow the requirements of the target algorithm or protocol. Do not treat an arbitrary integer, float, or byte count as a valid key.

Can I reproduce a result by entering the same settings?

No. This generator is intended to obtain fresh Web Crypto randomness and does not expose a seed for deterministic replay. Record the generated output if an exact value must be reused. For reproducible tests or simulations, use a seeded pseudo-random generator instead; that requirement differs from generating unpredictable security-oriented values.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools