Skip to content
ToolsOnDuty - free online tools
Security & Cryptography

Random Bytes Generator

Generate secure random bytes in hex, Base64 or decimal.

Free foreverRuns in your browserNo sign-up

Bytes come from your browser's cryptographically secure random generator and are never sent anywhere. Useful for salts, nonces, keys and IDs.

100% private - runs entirely in your browser.

Your input, keys and passwords are never uploaded. Want proof? Load this page, then turn off your internet - the tool still works. For an exact check, open your browser's DevTools Network tab and confirm no data is sent when you use it.

About the Random Bytes Generator

Generate cryptographically secure random bytes for salts, nonces, tokens and IDs.

Choose how many bytes and the output format: hex, Base64 or a decimal array.

Bytes come from your browser's secure random generator and are never sent anywhere.

Key features

  • 1 to 1024 bytes
  • Hex, Base64 or decimal output
  • Cryptographically secure randomness
  • Copy the result instantly

How to use

  1. 1Choose the number of bytes and a format.
  2. 2Click generate to create the bytes.
  3. 3Copy the result.

Examples

16 bytes of hex
Input: 16 bytes, hex
Output: 32 hex characters

Each byte is two hex characters, so 16 bytes is 32 characters.

Decimal array
Input: 8 bytes, decimal
Output: 8 numbers from 0 to 255

Handy when you need byte values as numbers.

Frequently asked questions

What are random bytes used for?
They are the building blocks of salts, nonces, initialization vectors, session tokens and unique IDs.
How random are they?
They use the Web Crypto secure random generator, which is suitable for cryptographic use.
Are the bytes uploaded?
No. They are generated locally and never sent anywhere.