AES Decryption Tool - Decrypt AES-CBC, GCM & CTR Ciphertext
Decrypt AES-encrypted data online using AES-128, AES-192, or AES-256 in CBC, GCM, or CTR mode. Supports hex and Base64 input with real Web Crypto API.
About
AES (Advanced Encryption Standard) operates on fixed block sizes of 128 bits with key lengths of 128, 192, or 256 bits. Incorrect decryption parameters - wrong mode, mismatched IV, or truncated ciphertext - produce garbage output or silent data corruption. This tool performs real AES decryption via the browser's native Web Crypto API, not a simulation. It supports CBC (requires PKCS#7 padding), GCM (authenticated encryption with a 128-bit tag), and CTR (stream cipher mode with a counter nonce). Limitation: passphrase-based key derivation uses PBKDF2 with 100000 iterations of SHA-256. If the original encryption used a different KDF (scrypt, Argon2), you must supply the raw key directly.
Feeding a GCM ciphertext to CBC mode will fail silently or throw an authentication error. Always verify the mode and key size match the encryption parameters. The IV (Initialization Vector) must be exactly 16 bytes for CBC and CTR, and 12 bytes for GCM. This tool validates these constraints before attempting decryption. Pro tip: if you receive ciphertext as a single blob, the IV is often prepended - check with the sender for the exact format.
Formulas
AES decryption reverses the encryption transformation. For a ciphertext block C with key K, the plaintext P is recovered as:
In CBC mode, each plaintext block depends on the previous ciphertext block:
Where C0 = IV (Initialization Vector) and ⊕ denotes bitwise XOR.
For PBKDF2 key derivation from a passphrase:
Where DK is the derived key, iterations = 100000, and keyLen ∈ {128, 192, 256} bits. The salt must be provided and match the value used during encryption.
Reference Data
| AES Mode | IV/Nonce Size | Auth Tag | Padding | Use Case | Security Level |
|---|---|---|---|---|---|
| CBC | 16 bytes (128 bits) | None | PKCS#7 | File encryption, TLS 1.2 | Secure (with HMAC) |
| GCM | 12 bytes (96 bits) | 128 bits | None (stream) | TLS 1.3, API encryption | Authenticated |
| CTR | 16 bytes (128 bits) | None | None (stream) | Disk encryption, custom protocols | Secure (with MAC) |
| ECB | None | None | PKCS#7 | Legacy systems | Weak (pattern leakage) |
| Key Size Reference | |||||
| AES-128 | 16 bytes key | 10 rounds | Standard | ||
| AES-192 | 24 bytes key | 12 rounds | High | ||
| AES-256 | 32 bytes key | 14 rounds | Maximum | ||
| PBKDF2 Parameters | |||||
| Hash | SHA-256 | Iterations: 100000 | NIST SP 800-132 | ||
| Salt | 16 bytes min | Random, unique per key | Required | ||
| Common Encoding Formats | |||||
| Hex | Characters: 0-9, a-f. Length = 2 × byte count | Human-readable | |||
| Base64 | Characters: A-Z, a-z, 0-9, +, /. Padding: = | Compact | |||