Random Hex String Generator

Generate random hexadecimal strings of 8, 16, 32 or 64 characters for tokens, salts and test fixtures.

About Random Hex String Generator

Generate random hexadecimal strings of 8, 16, 32 or 64 characters. Hex strings are handy for API tokens in test environments, salts, colour codes and placeholder IDs. Each character carries four random bits, so a 32-character string has 128 random bits.

Values come from the browser's cryptographic random generator.

How to use it

  1. Enter how many strings you need.
  2. Choose the length.
  3. Copy the list.

Questions

Is my text uploaded?

No. Everything runs in your browser; nothing you type or generate is sent to a server.

Is a random hex string a secure secret?

The bits are cryptographically random, so a 32 or 64 character string is strong. Store production secrets in a secrets manager, not in tests.

Why are the lengths even numbers?

Each byte is two hex characters, so the length is always a multiple of two.

More Math & Randomness tools

Home · All Tools · Blog