RandomNr

Random Binary Number Generator

Generate random binary strings of any bit length, with optional grouping into bytes.

Random Binary Generator

10110011

8 bit binary

How many values

Length

How to use the binary generator

  1. Set the bit length, from a single bit up to 256.
  2. Turn on grouping to space the bits into readable bytes.
  3. 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.

BitsValuesLargest valueCommon name
121a bit
41615a nibble
8256255a byte
1665,53665,535a 16 bit word
32about 4.3 billion4,294,967,295a 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

Convert a value to binary with the number base converter, or draw hex instead.