The AES Key Generator creates a ready-to-use AES-128, AES-192, or AES-256 key together with a correctly sized IV for GCM (12 bytes) or CBC (16 bytes), using the browser's Web Crypto API. Choose it over the general Encryption Key Generator when the key is specifically for AES, because it also gives you the IV and a JWK you can import directly with crypto.subtle.
Click Generate to create an AES key and IVInput
AES-256, GCM (hex)
Output
Key: ff534f01353b29de7770995a166411b12d3b94b1f47276994ea4c1b6c3923781 IV (12 bytes): d0f261bbdbcb211bf9f25267
Input
AES-128, CBC (Base64)
Output
Key: rLOQXkerTsmjgjwLv66MJw== IV (16 bytes): JL/UIOzGuEowTvrurJxvfA==
AES is the workhorse of symmetric encryption, and this tool generates a key for it the way the standard actually recommends: through `crypto.subtle.generateKey`, the Web Crypto API built directly into your browser, rather than assembling raw random bytes and hoping they behave like a proper key.
GCM and CBC need different things alongside the key itself. GCM wants a 96-bit nonce, and reusing that nonce with the same key is one of the more damaging mistakes in applied cryptography, it can leak the authentication key outright. CBC wants a full 128-bit IV instead. This tool generates the right size automatically based on whichever mode you pick, so that detail isn't something you have to track down from a spec.
The three output tabs exist because different tools expect different shapes. Hex is the most universally readable. Base64 is compact and common in config files and APIs. JWK (JSON Web Key) is the format most JavaScript crypto libraries and browser APIs expect when you want to re-import a key with `crypto.subtle.importKey` rather than just storing raw bytes.
256-bit has become the default almost everywhere, though 128-bit AES has no known practical weakness either, people mostly reach for 256 out of caution rather than necessity. Whichever size you pick, treat the key and IV as a pair: store them together, and never generate a new IV without also rotating or at least tracking which key it belongs to.
More Security