Pseudo-Random Number Generator

Generate the chosen number of random bytes and display them as hex, integers, a byte array or raw data.

Input: TextResult: Text

Text input

Run to see the result

Examples

An eight-byte demonstration nonce

Generate 8 bytes and display them as hex. The check validates length and syntax; it cannot certify entropy. Do not copy a published example output into a real secret.

Input

Expected checks

8 random bytes as 16 hexadecimal digits.
Number of bytes
8
Output as
Hex
A sixteen-byte identifier seed

Generate 16 bytes and display them as hex. The check validates length and syntax; it cannot certify entropy. Do not copy a published example output into a real secret.

Input

Expected checks

16 random bytes as 32 hexadecimal digits.
Number of bytes
16
Output as
Hex
A thirty-two-byte sample secret

Generate 32 bytes and display them as hex. The check validates length and syntax; it cannot certify entropy. Do not copy a published example output into a real secret.

Input

Expected checks

32 random bytes as 64 hexadecimal digits.
Number of bytes
32
Output as
Hex
A sixty-four-byte test buffer

Generate 64 bytes and display them as hex. The check validates length and syntax; it cannot certify entropy. Do not copy a published example output into a real secret.

Input

Expected checks

64 random bytes as 128 hexadecimal digits.
Number of bytes
64
Output as
Hex
A four-byte binary marker

Generate 4 bytes and display them as hex. The check validates length and syntax; it cannot certify entropy. Do not copy a published example output into a real secret.

Input

Expected checks

4 random bytes as 8 hexadecimal digits.
Number of bytes
4
Output as
Hex

This operation uses the browser's built-in crypto.getRandomValues() method if available. If this cannot be found, it falls back to a Fortuna-based PRNG algorithm.

Format reference: Pseudo-Random Number Generator background and specification

Related tools

Browse encryption / encoding tools