The Encryption Key Generator produces raw random keys of 128, 192, 256, or 512 bits, or any custom length from 8 to 128 bytes, in hex, Base64, or Base64url, up to 50 at a time. It is the general-purpose option for symmetric keys, HMAC keys, app secrets, and anything that just needs N random bytes; use the AES Key Generator when you also need an IV, or the RSA Key Generator for a key pair.
32 random bytes = 256 bits, shown as 64 hex characters.
Click Generate to create an encryption keyInput
256-bit, hex
Output
15453c1cace0172b28c1087afa4f2f01cb8b5809671db78a209e9e49ec6e0016
Input
128-bit, Base64
Output
FKWTpEwKITyj5LDw597hNA==
Input
Custom 48 bytes (384 bits), Base64url
Output
lyFp78jbHodk8Zv9gLTVhFjexOXnJzXBNDNs85ESGZal9gWoZI8D3m1fjacwp4HL
A raw encryption key is nothing more than a fixed number of random bits, and that simplicity is exactly the point. There's no structure to reverse-engineer and no pattern to exploit, only entropy. This tool generates that entropy straight from `crypto.getRandomValues`, your browser's cryptographically secure random source, and nothing weaker.
128-bit keys are still considered secure for most symmetric encryption today, though 256-bit has become the practical default across modern systems, partly from caution and partly because the performance cost of the extra bits is negligible on current hardware. 512-bit keys show up less often, mostly for specialized protocols or keys that get split or derived into smaller pieces downstream.
Format matters depending on where the key is headed. Hex is the easiest to read and debug by eye. Base64 packs the same entropy into fewer characters, which is handy when a config file or API payload has a size limit. Base64url swaps out `+` and `/` for URL-safe characters, useful when the key might end up inside a URL or a token.
Custom lengths cover the cases the standard sizes don't. Some frameworks want a specific number of random bytes rather than a bit size: a 64-byte (512-bit) HMAC-SHA512 key, a 48-byte session secret, or a 16-byte salt. Choose Custom, set Bytes, and the tool shows the encoded length before you generate: n bytes become 2n hex characters, 4 × ceil(n ÷ 3) Base64 characters with padding, or about 1.33n Base64url characters without padding. The range runs from 8 bytes (64 bits, the minimum worth calling a key) to 128 bytes (1,024 bits).
A raw key like this isn't the same thing as a password someone types in. It's meant to be stored as configuration, in an environment variable, a key vault, or a secrets manager, not memorized or typed by hand. And because it's generated fresh every time you click the button, nothing here is ever saved or reused unless you copy it yourself.
More Security