aes-encryption.com
English

AES · GCM / CBC / CTR

AES Key Generator

Generate exact-length AES key bytes with your browser's cryptographic random source. Choose the size and encoding, then save the result yourself.

Browser-local processing128 / 192 / 256No analytics inside encryption workspace
Processing locally…
Loading, copying or downloading blocked? Open the isolated workspace in a new tab. Inputs are not transferred. ↗

Random bytes, not a memorable password

An AES key contains exactly 16, 24 or 32 bytes. The generator uses crypto.getRandomValues, not Math.random, a timestamp or a short word expanded with zeroes. Hex and Base64 are alternate encodings of those same bytes; they do not add strength by making the displayed string longer.

A generated key is not stored in browser storage, a URL, an account or a server backup. Copy or download it deliberately and protect the saved file. Clearing or leaving the page releases the displayed value; this is not a guarantee that every device memory copy has been securely erased.

How to generate and use a key

  1. Select AES-128, AES-192 or AES-256 according to the receiving system.
  2. Select Hex or Base64, then generate. Each click creates new bytes; it does not re-encode a previously saved key.
  3. Copy the entire result, including Base64 padding if present. Confirm the decoded length at the destination.
  4. In the AES tool's raw profile, choose the same encoding and key size. Save mode and IV/nonce parameters separately from the key.

Key generation does not guarantee every browser natively implements AES-192 encryption. This site's raw AES-192 operations use an explicitly identified noble-ciphers compatibility backend; AES-128/256 use Web Crypto. Both paths are tested against independent implementations.

Key size and encoded length

AES keyRaw bytesHex charactersStandard Base64 characters
AES-128163224, including padding
AES-192244832
AES-256326444, including padding

Do not count UTF-8 characters as bytes. Do not cut a longer key, repeat a short password or append zeroes to satisfy a length check. If you need password-based encryption, choose the password profile, which derives a key with documented salt and cost parameters instead.

Technical references

Updated October 16, 2026

Popular guides

What is AES?GCM vs CBC vs CTRAES key sizesIVs and noncesAES vs RSAAES vs DESPadding explained

Frequently asked questions

Does changing Hex to Base64 keep my previous key?

No. Editing the generator settings invalidates the old result; Generate creates a new random key. Convert a saved key's encoding with a trusted byte-encoding tool if you need identical bytes.

Is the key automatically saved?

No. You must copy or download it. There is no server backup or recovery account.

Can I paste a generated key into the password profile?

That would treat it as a password and derive different bytes. To use it directly as an AES key, select the raw-key profile with its correct encoding.