About this tool
Generate cryptographically secure random bytes in your browser using crypto.getRandomValues, then view them as hex, base64, a decimal array or binary.
Length is in bytes, from 1 to 1024, starting at 16. Fractions are cut off, an empty or zero entry falls back to 16, negative values become 1 and larger ones are lowered to 1024. Hex gives two lowercase characters per byte, base64 is the browser's btoa output, the decimal array lists numbers from 0 to 255 in square brackets, and binary shows eight digits per byte separated by spaces.
A new value is produced when the page opens and on every Generate press. Changing the format dropdown shows the same bytes in the new format, so you can copy one value as hex and then as base64.