Generate random hexadecimal strings of 8, 16, 32 or 64 characters for tokens, salts and test fixtures.
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.
No. Everything runs in your browser; nothing you type or generate is sent to a server.
The bits are cryptographically random, so a 32 or 64 character string is strong. Store production secrets in a secrets manager, not in tests.
Each byte is two hex characters, so the length is always a multiple of two.