About the Random Byte Generator
A byte is a number from 0 to 255, and many programs need a handful of random ones: test input for a parser, a placeholder buffer, a made-up hex dump or a mask. This generator makes up to 10,000 random bytes and shows them the way you need. Show each byte as two hex digits, as a decimal, or as eight binary digits. Choose how many bytes go on each line and whether a space, a comma or nothing separates them, so the result can be pasted into code or a hex editor. The bytes come from your browser's secure random generator and are made on your device. For secrets such as keys, read the notes below.
Updated October 2026
How to use the Random Byte Generator
- 1Enter how many bytes you want, from 1 to 10,000.
- 2Choose how to show each byte: hex, decimal or binary.
- 3Set how many bytes go on each line.
- 4Choose the separator between bytes: a space, a comma or nothing.
- 5Press Generate, then copy the result or download it as a text file.
What a byte is
A byte is eight bits, which gives 256 possible values from 0 to 255. In hex these are written 00 to FF, because two hex digits cover exactly one byte. In decimal they are 0 to 255, and in binary eight digits such as 10110010.
Files, network packets, colours, keys and hashes are all sequences of bytes, which is why a quick source of random ones is useful.
When random bytes are useful
- Making sample input for a parser, a checksum or a hash function.
- Filling a buffer or an array in a test.
- Creating a fake hex dump for a tutorial, a screenshot or a presentation.
- Practising reading hex, decimal and binary side by side.
- Generating an initialisation vector, a salt or a nonce for a demo, not for production secrets.
Choosing the format and layout
Hex is the usual choice for dumps and keys, and 16 bytes per line matches the classic hex editor layout. Decimal suits arrays in code, and binary is best for teaching or for looking at individual bits.
A comma separator makes the result ready for an array. A space separator is easiest to read. No separator gives one long string, which is how many tools expect keys and hashes.
A note on secrets
The generator uses the same secure source as password tools, but this page is not a key manager. Anything you generate and copy may stay in your clipboard or history. Use it freely for tests and learning, and use a proper key tool for anything that guards real data.
Phone and computer
On a phone the options stack in one column. Long lines scroll sideways inside the result box, so the page does not. Random bytes are useful for tests, and other formats help you work with them. Use the Random Hex Generator for text output, the Random Binary Generator for bits, and the Hex to Decimal Converter to read a value.
Features
- Hex (00 to FF), decimal (0 to 255) or 8-bit binary output
- Up to 10,000 bytes per press
- Choose bytes per line, from 1 to 256
- Separate with a space, a comma or nothing, for easy pasting into code
- Secure random source in your browser
- Nothing uploaded
Frequently asked questions
Are the bytes really random?
Yes. Each byte is a uniform choice from 0 to 255 taken from your browser's secure random generator, so every value is equally likely and the results cannot be predicted or repeated.
How do I get a hex string without spaces?
Choose Hex, set the separator to Nothing and put all the bytes on one line by setting bytes per line to the same number as the byte count, up to 256. For longer strings, set 256 and join the lines.
How do I use the output in code?
Choose Hex or Decimal and the Comma separator, then wrap the result in brackets. For example, a comma-separated decimal list can be pasted into a JavaScript array or a Python list.
Can I use these bytes as an encryption key?
The source is suitable for keys, but a key shown on screen can be copied, logged or seen by others. For real secrets, prefer a tool built for key generation, keep the result private, and do not paste it into chats or shared documents.
Why do some hex bytes start with 0?
Each byte is always shown with two hex digits, so the byte 10 appears as 0A and 5 as 05. That keeps every byte the same width, as in a hex editor.
What is the largest number of bytes I can make?
10,000 per press. Press Generate again to make more.
Is my data sent anywhere?
No. The bytes are made in your browser and never leave your device.