Random Byte Generator
Generate raw random bytes and display them in whichever notation you are pasting into: hex, decimal, binary, Base64, a C array initialiser, or an escaped string literal for C, Python or JavaScript. Separator and case are adjustable. The bytes come from the browser cryptographic random number generator, the same source used for keys and nonces, so they are suitable for test vectors and seeds as well as filler. Everything is generated in your browser; nothing is uploaded and no result is recorded anywhere.
How it works
Generates raw bytes and shows them in whichever notation you need: hex, decimal, binary, Base64, a C array initialiser or an escaped string literal.
The bytes are drawn from the browser’s cryptographic random number generator, which is the same source used for keys and nonces.
Values are generated in your browser and never sent anywhere.
Two characters per byte — the usual form for keys, hashes and identifiers.
Adjust the settings above and values appear here.
Frequently asked questions
Which notation should I pick?
Hex for keys, identifiers and anything a person will compare by eye; Base64 for pasting into JSON or a config file, since it is about a third shorter; a C array or escaped string when the bytes are going straight into source code.
Why are numbers and booleans shown as bytes rather than values?
A byte is just eight bits — how it is interpreted depends entirely on what reads it. The notations here are different ways of writing the same bytes, not different data.
Can I use these as an encryption key or an initialisation vector?
The randomness is cryptographic quality. For a real system, generating the key inside the system that will use it is still the better habit; this tool is best for test vectors, seeds and examples.
Why does the separator option turn off for some notations?
Base64, the C array form and the escaped string form each have their own structure — a separator would make the output invalid rather than more readable.
How many bytes can I generate at once?
Up to 4,096 bytes per value. The generator requests them in chunks internally, because the underlying browser call refuses more than 65,536 bytes in a single request.
Related tools
Random Hex Generator
Generate random hexadecimal strings of any length, with presets for the common key and token sizes.
Random Binary Generator
Generate random strings of ones and zeros, optionally grouped, for test vectors and teaching material.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to plain text, entirely in your browser, with full UTF-8 support.