Random stream generator

Data streams

Generates a stream of random bytes of specified set and size.

This online tool generates a stream of given size and with given set of byte values and lets you download it. 

Ctrl+Shift+E ↔

Specify space-separated hex codes for individual bytes or group using dashes to create ranges.
For example, "65-90 97-122" generates a file with upper- and lowercase letters.

Ctrl+Shift+E ↔
Clear (all) | Digits | Uppercase/lowercase letters | Whitespace

This tool uses two algorithms to generate random data: 

  1. Using PHP functions to generate random bytes. This approach is relatively slow on large streams but it allows to control the value of each byte.
  2. Random stream is read from Unix socket /dev/urandom. This is faster than running PHP code and should supply more uniform and entropic bytes but it can't be filtered to allow a specific set of byte values – for this extra processing is necessary which, however, is quite slow compared to PHP-only method (the first algorithm) because extra passes have to be done in order to meet desired stream length.

For performance reasons the first method (by PHP cycle) is used when set of allowed bytes is less than 45% of all possible values (that is, 256 * 0.45 = 115 and below). Otherwise the second method (reading /dev/urandom) is used. 

Fastest processing and best results (using /dev/urandom) is met when no bytes are restricted (or a small amount of them is left out).