A hex token is a string of hexadecimal characters (0-9, a-f) representing random bytes. Each byte becomes two hex characters, so a 32-byte token is 64 characters long. Hex tokens are a common, human-readable format for session identifiers, API secrets, and cryptographic keys.
Session secrets for web frameworks (Django, Rails, Express), CSRF tokens, webhook signing secrets, oauth client secrets, and encryption key material. A 32-byte (256-bit) hex token is the recommended default for most security purposes.
Toggle the Uppercase (hex) option to switch between lower-case (a-f) and upper-case (A-F) hex output. Lowercase is more common in URLs; uppercase is often used in display contexts or legacy systems. The byte values are identical — only the display changes.
What is a hex token used for?
Hex tokens are used for session secrets, CSRF tokens, webhook signing keys, OAuth client secrets, encryption key material, and anywhere a simple, human-readable random string is needed.
How long should my hex token be?
32 bytes (64 hex characters / 256 bits) is the recommended default for most security purposes. 16 bytes (128 bits) is adequate for CSRF tokens. For encryption keys, follow your algorithm's requirements.
What is the difference between lowercase and uppercase hex?
Nothing in terms of randomness — only the display format. Lowercase (a-f) is conventional in URLs and modern systems; uppercase (A-F) is sometimes required by legacy protocols. Both represent the same byte values.
Can I generate uppercase hex tokens?
Yes. Check the 'Uppercase (hex)' option and all generated hex characters will be upper-case (A-F).