Generate API keys, hex/Base64/URL-safe secrets and JWT secrets.
The Secret Generator creates random secrets such as API keys, signing keys and tokens in hex, Base64, Base64URL, alphanumeric or UUID v4 form. You choose the size and how many to make, from 1 to 100. Values come from the browser cryptographic random source.
A secret is a random value that only your systems know, such as an HMAC signing key, an encryption key, a session token or an API key. Its security depends on unpredictability, so it must come from a cryptographically secure random number generator, not from a timestamp or a typed word. Length is measured in bytes of randomness: 32 random bytes give 256 bits. The same bytes can be written in different encodings. Hex uses two characters per byte, Base64 about four characters for three bytes, and Base64URL is the same without padding and with URL-safe characters. A UUID v4 has 122 random bits, with fixed bits marking version 4 and the variant, which makes it fine as an identifier but less suitable as a long-term key than 32 random bytes.
They come from crypto.getRandomValues, the secure random generator built into the browser.
32 bytes (256 bits) is a common choice for HMAC and symmetric keys. 16 bytes (128 bits) is the usual minimum for random tokens.
Base64URL replaces + and / with - and _ and omits the = padding, so it is safe in URLs and filenames.
It has 122 random bits, but it is designed as an identifier and its format is well known. Use a longer random value for keys and tokens.
No. They are created in the page, nothing is stored or transmitted, and they disappear when you leave or regenerate.