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
- Select AES-128, AES-192 or AES-256 according to the receiving system.
- Select Hex or Base64, then generate. Each click creates new bytes; it does not re-encode a previously saved key.
- Copy the entire result, including Base64 padding if present. Confirm the decoded length at the destination.
- 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 key | Raw bytes | Hex characters | Standard Base64 characters |
|---|---|---|---|
| AES-128 | 16 | 32 | 24, including padding |
| AES-192 | 24 | 48 | 32 |
| AES-256 | 32 | 64 | 44, 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.
Related tools and reading
- Encrypt text
- Decrypt text
- Encrypt a file
- What Is AES Encryption? Keys, Blocks and Recovery
- AES-GCM vs CBC vs CTR: Authentication and Parameters
- AES-128 vs AES-192 vs AES-256: Bytes and Encodings
Technical references
Updated October 16, 2026
