Random Hex Generator
Generate random hexadecimal strings of any length, in bulk, from a secure random source. Optional uppercase and 0x prefix. Ideal for IDs, salts and test data.
Runs in your browser. Nothing is uploaded.
About Random Hex Generator
Random Hex Generator outputs strings of random hexadecimal digits (0-9 and a-f). Each character carries 4 bits, so 32 characters is 128 bits and 64 characters is 256 bits, the sizes of common keys, salts and nonces.
Use it for test fixtures, database IDs, cache-busting tokens or nonces. Add a 0x prefix for code literals or switch to uppercase to match a system's format.
How to use Random Hex Generator
- Set the options you want.
- Your result is generated straight away. Press Generate again for a new one.
- Copy the result with one click.
Frequently asked questions
How many hex characters make 256 bits?
64. Each hex digit is 4 bits, and two digits make one byte.
Is it random enough for keys?
Yes. It uses crypto.getRandomValues. For an AES key with the right length preset, try the Encryption Key Generator.
Is Random Hex Generator free and private?
Yes. Random Hex Generator is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.