Random Binary Number Generator
Generate random binary strings of any bit length, with optional grouping into bytes.
Random Binary Generator
8 bit binary
How many values
Length
How to use the binary generator
- Set the bit length, from a single bit up to 256.
- Turn on grouping to space the bits into readable bytes.
- Generate one value or a batch, then copy or export.
About Random Nr's Binary Number Generator
The random binary number generator produces binary strings of any bit length, with an option to group them into bytes for readability. Set the number of bits, choose grouping if you want it, and Random Nr fills each position with a random bit, which is useful for coding exercises, test fixtures and teaching how binary works.
What are bits and bytes
Binary counts in powers of two, so each extra bit doubles the range. These are the landmark widths every programmer knows.
| Bits | Values | Largest value | Common name |
|---|---|---|---|
| 1 | 2 | 1 | a bit |
| 4 | 16 | 15 | a nibble |
| 8 | 256 | 255 | a byte |
| 16 | 65,536 | 65,535 | a 16 bit word |
| 32 | about 4.3 billion | 4,294,967,295 | a 32 bit word |
Eight bits make a byte because a byte can hold exactly one of 256 values, enough for every character in the original ASCII set with room to spare.
How to read grouped binary numbers
A long binary string is hard to read as one run of digits, so grouping inserts a space every eight bits to show it as bytes. The value 10110011 is one byte, and two grouped bytes such as 10110011 01001010 read far more easily than the sixteen digit string. Each bit here is drawn independently from the browser cryptographic source, so the string carries no pattern.
What random binary numbers are used for
Random binary drives test fixtures, bit masks, teaching examples and any place a raw pattern of ones and zeros is needed. To turn a binary value into decimal or hex, paste it into the number base converter, and for the hexadecimal shorthand of the same bytes, the hex generator is the quicker route.
More math and sequence generators
Frequently asked questions
What bit lengths can I use
From 1 to 256 bits, so a nibble, a byte, or a long word are all a click away.
What does group into bytes do
It inserts a space every eight bits, so a long binary string reads as bytes rather than one run of digits.
Are the bits random
Yes. Each bit is drawn from the browser cryptographic random source, so the string is unpredictable.
Can I make several
Yes, up to 500 values at once, ready to copy or export.
Is it free
Yes, free and with no sign up.
Related generators
- Number Base Converter
- Random Binary Number Generator
- Random Hex Number Generator
- Random Octal Number Generator
- Random Roman Numeral Generator
- True Random Number Generator
- Secure Random Number Generator
- Normal Distribution Generator
- Random Sample Generator
- Random Combination Generator
- Permutation Generator
- Random Number Generator
Convert a value to binary with the number base converter, or draw hex instead.