Skip to content

Random Bytes

Generate cryptographically random bytes.

Length (bytes)
Format
Output

No result

About Random Bytes

Random Bytes generates cryptographically secure random bytes, the building block for keys, tokens, salts and anything else that must be unpredictable. Choose a length and a format, and the tool returns the bytes as hex or base64.

The bytes come from the secure random generator built into the runtime, not the ordinary random number generator, which is exactly the property that makes them suitable for secrets. Hex output is lowercase with no separators - thirty-two bytes reads sixty-four hex characters - and the base64 option gives the standard encoding, forty-four characters ending in a single padding for the same thirty-two bytes.

The length is clamped to a window of one to one thousand and twenty-four bytes, and there is no seed, so the output cannot be reproduced. That is correct for security but means you cannot regenerate the same bytes for testing. Only hex and base64 are offered, with no raw binary download and no other encodings.

How to use Random Bytes

  1. 1 Set the Length field to how many bytes you want, or leave the default of thirty-two.
  2. 2 Pick hex or base64 as the output format.
  3. 3 Run the tool to read the random bytes; two runs are effectively always different.

Frequently asked questions

Are these bytes safe to use as a key?

Yes, the source is the cryptographically secure generator, so the output is suitable for keys, tokens and salts. There is no seed and no determinism, which is what you want for secrets.

Can I reproduce the same bytes?

No. There is no seed and no deterministic mode, so the output cannot be regenerated for testing or verification. That is a deliberate security property.

Why is hex lowercase and unseparated?

The hex format is lowercase with no separators, so thirty-two bytes read sixty-four hex characters. There is no uppercase option and no grouped output with spaces or dashes.

Can I download the raw binary?

No. Only hex and base64 are offered, with no raw binary download and no other encodings such as decimal or octal.

Free, online, and private

Free to use

Random Bytes is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How Random Bytes behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Input a Length field starting at thirty-two bytes and a Format selector starting at hex
Source the bytes come from the cryptographically secure generator, not the ordinary random number generator
Output hex is lowercase with no separators - thirty-two bytes reads sixty-four hex characters
Base64 the alternate format is standard base64 - thirty-two bytes reads forty-four characters ending in a single padding
Length clamp the requested length is clamped to the window from one to one thousand and twenty-four bytes
Uniqueness two runs are effectively always different, since the source is a secure random generator

Compiled from the implementation of this tool and checked against it by itoolnet.

What Random Bytes does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • There is no seed and no determinism. The output cannot be reproduced, which is correct for secrets but means there is no way to regenerate the same bytes for testing or verification.
  • Only hex and base64 are offered. There is no raw binary download, no uppercase hex, no grouped output with separators, and no other encoding such as decimal or octal.
  • The tool only produces random bytes. It does not derive a key from a password, does not stretch a seed and does not combine with a salt - anything built on top of the bytes is left to the caller.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to Random Bytes with the snippet below. It is free, runs entirely in your browser, and needs no signup.