Skip to content
ToolsOnDuty - free online tools
Security & Cryptography

Encryption Key Generator

Generate a random AES key in hex and Base64.

Free foreverRuns in your browserNo sign-up
Key size

Keys use your browser's secure random generator and are never sent anywhere. A 256-bit key is the usual choice for AES.

About the Encryption Key Generator

Generate a random symmetric key for AES encryption in both hex and Base64 formats.

Choose 128, 192 or 256 bits, then copy the key straight into your app or config.

Keys use your browser's secure random generator and are never sent anywhere.

Key features

  • 128, 192 or 256-bit keys
  • Hex and Base64 output
  • Cryptographically secure randomness
  • Copy either format instantly

How to use

  1. 1Choose a key size.
  2. 2Click generate to create a key.
  3. 3Copy the hex or Base64 value.

Examples

256-bit key
Input: 256 bits
Output: 64 hex characters

A 256-bit key is 32 bytes, shown as 64 hex characters.

Base64 form
Input: same key
Output: A Base64 string

The same bytes encoded as Base64 for config files.

Frequently asked questions

Which key size should I use?
256-bit is the usual choice for AES today. 128-bit is still strong and faster where that matters.
What is the difference between hex and Base64?
They are two encodings of the same random bytes. Use whichever your library or config expects.
Is the key uploaded?
No. It is generated locally and never sent anywhere.