Skip to content
OddsockLocal
Local
Source text
Length32
How many1
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Decide whether you need a character length or a byte length. This field is characters.
  2. Type the length. 64 hex characters equals 32 bytes.
  3. Copy the string. Generate again if it might have been screenshotted.

What is Random hex?

A fixture, a trace id, or a salt sometimes has to be hex of a specific character length, not a specific number of bytes. This page draws that many characters from 0-9 and a-f. Length 32, the opening value, is 32 hex digits, which is 16 bytes and 128 bits. One test draw is bca856486ff911cf1102cccc1f12d8b0. The secret-key page is the one that asks for a size in bytes and emits 64 hex digits for 32 bytes.

Read more

Confusing the two is how a 128-bit value gets filed as if it were 256. Count the characters. Sixty-four hex digits is 32 bytes. Thirty-two hex digits is 16 bytes. You can ask for up to 256 characters and up to 1000 strings.

The draw is cryptographic and unbiased. It is still just text on the page. A hex secret pasted into a ticket is public.

Use cases

  • A test suite needs a 32-digit hex id that is not a guessable counter.
  • A developer compares a 32-digit string with a 64-digit key and sees the bit gap.
  • A salt column that stores hex gets a fresh 16-byte value.
  • A demo of a hash input uses random hex instead of the word password.
  • A batch of 20 identifiers is generated for fixtures that must not collide with production.

Thirty-two hex digits

Length 32, one string.

bca856486ff911cf1102cccc1f12d8b0. That is 128 bits. A 256-bit hex key is 64 digits and comes from the secret-key page at 32 bytes.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

No. Each hex character is 4 bits. Length 32 is 16 bytes, 128 bits. Length 64 is 32 bytes, 256 bits.