Crypto · 91 tools · nothing uploads

Random bytes

Cryptographically strong random bytes from crypto.getRandomValues, formatted as hex or base64, a fresh CSPRNG draw every run, computed on your device.

Options

Random bytes draws length bytes, 32 by default, from crypto.getRandomValues and prints them as hex, base64 or base64url. A length outside 1 to 1024 is refused before any bytes are drawn. Every run pulls a fresh value from the browser's CSPRNG rather than re-rolling automatically as you change options, so pressing Run again is what gets you a new draw.

Questions

What length range is allowed?

1 to 1024 bytes, defaulting to 32; anything outside that range is refused before any bytes are drawn.

What output formats can I choose?

Hex, base64 or base64url, chosen with the format option; the number of random bytes stays the same in each.

Where does the randomness come from?

crypto.getRandomValues, the browser's CSPRNG.

Does it re-roll automatically as I change options?

No, live is off, so a fresh draw only happens when you press Run.

Can I use this from the command line?

Yes, the same code runs on the page, the CLI and MCP.

Related Crypto tools