My Tools Garage

Random Bytes Generator

Cryptographically secure random bytes, any encoding.

in-browser

How to use

  1. 1 Enter the number of random bytes you want.
  2. 2 Choose an output encoding: hex, Base64, binary or decimal array.
  3. 3 For hex, optionally switch to uppercase.
  4. 4 Click Generate for a fresh batch, then copy the result.

About Random Bytes Generator

The Random Bytes Generator produces unpredictable, cryptographically secure random bytes and shows them in whichever encoding you need.

Pick how many bytes you want and choose hex, Base64, raw binary, or a comma-separated decimal array — handy for seeding keys, generating nonces and initialisation vectors, building test fixtures, or filling buffers during development.

Randomness comes from the browser’s Web Crypto API (crypto.getRandomValues), the same source used for real cryptographic operations, so the output is suitable far beyond what Math.random can offer.

Hex output can be lowercase or uppercase, and the Generate button gives you a fresh batch whenever you need one, so it is easy to compare a few candidates or grab several values in a row.

Because everything runs locally, no bytes ever leave your machine — nothing is sent to a server, logged or stored.

That makes it safe for sensitive material like secret keys and tokens, and it keeps working offline once the page has loaded.

The maximum batch size is generous enough for buffers and test data while keeping the page responsive.

Copy the result with one click and paste it straight into your code, config or terminal.

FAQ

Are these bytes safe to use as a cryptographic key?

They are generated with the Web Crypto API’s secure random source, which is suitable for keys, nonces and IVs. As with any key material, store and transmit it safely after copying.

How many bytes can I generate at once?

Up to 65,536 bytes per batch. That is plenty for keys and buffers while keeping the encoding fast in the browser.