AES cipher
Encrypt or decrypt text with AES — CBC, CTR, GCM or ECB, 128/192/256-bit keys, hex or base64. Runs in your browser; nothing is uploaded.
About this tool
AES cipher is a low-level AES encrypt/decrypt tool for developers: you supply the raw key and IV/nonce, pick the mode, and get the result — handy for implementing or testing against a spec, debugging interop, or learning how the modes differ.
- Modes:
GCM(authenticated — detects tampering, recommended),CBC,CTR, andECB(insecure, reveals patterns — included for completeness only). - Key sizes: AES-128/192/256, selected automatically by the key length (16/24/32 bytes).
- Encoding: key, IV and ciphertext are hex or base64; the plaintext is UTF-8 text. For GCM the 16-byte authentication tag is appended to the ciphertext.
Privacy
Everything runs in your browser via WebAssembly — your key and data never leave the device. Also available from the gizza CLI and in chat.
Not sure which tool you want?
If you just want to protect a message with a passphrase (and have the salt,
key derivation and nonce handled safely for you), use the text-encrypt tool
instead — aes-cipher is for when you already have a specific raw key, IV and
mode.
FAQ
Why do I get "AES key must be 16/24/32 bytes"?
The key is decoded from hex or base64 first (per the format setting), and the decoded byte length selects the strength: 16 bytes = AES-128, 24 = AES-192, 32 = AES-256. A 32-character hex string is only 16 bytes — for AES-256 in hex you need 64 hex characters. A plain password is not a valid key; use the text-encrypt tool if you want passphrase-based encryption.
What IV or nonce size does each mode require?
CBC and CTR need a 16-byte IV, GCM needs a 12-byte nonce, and ECB takes none at all. The IV is decoded with the same format (hex/base64) as the key, so in hex that's 32 characters for CBC/CTR and 24 for GCM.
Where is the GCM authentication tag in the output?
For GCM the 16-byte tag is appended to the ciphertext, so the encoded output is ciphertext ‖ tag. When decrypting, paste that whole blob back in — if the tag doesn't verify (wrong key, wrong nonce, or tampered data), decryption fails instead of returning garbage.
Is it safe to paste a real key here?
The cipher runs entirely in your browser as WebAssembly — the key, IV and data are never transmitted anywhere. That said, ECB mode is included only for interop/teaching: it leaks patterns in the plaintext, so prefer GCM for anything real.
Developer & Automation Access
Run it from the terminal
Same engine as this page, headless — via the gizza CLI:
gizza tool aes-cipher "Text to encrypt…" 'key=base64 or hex key'New to the CLI? Get gizza →
Open it by URL
Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:
https://gizza.ai/tools/aes-cipher/?data=Text%20to%20encrypt%E2%80%A6&operation=encrypt&cipher=gcm&key=base64%20or%20hex%20key&iv=base64%20or%20hex%20iv&format=base64Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.
