AES Encryption / Decryption
AES encrypt/decrypt with CBC, CFB, CTR, OFB, ECB modes, Pkcs7/ZeroPadding/NoPadding, 128/192/256-bit keys, Base64 output, auto-detect key/IV format
What is AES encryption?
AES (Advanced Encryption Standard) is a symmetric encryption algorithm widely used to secure data. It operates on 128-bit blocks and supports key sizes of 128, 192, and 256 bits. AES is the most widely adopted encryption standard worldwide.
What are the encryption modes?
CBC (Cipher Block Chaining) chains blocks together for better security. CFB (Cipher FeedBack) turns AES into a self-synchronizing stream cipher. CTR (Counter) uses a counter for parallelizable encryption. OFB (Output FeedBack) creates a keystream for stream encryption. ECB (Electronic Code Book) encrypts each block independently — least secure, not recommended for large data.
What is padding?
Padding adds extra bytes to align data to block boundaries. Pkcs7 is the most common and recommended padding. Iso97971 adds a byte before Pkcs7 padding. AnsiX923 fills with zeros and a length byte. Iso10126 uses random bytes with a length byte. ZeroPadding fills with zero bytes. NoPadding requires input to be exactly block-aligned.
What is the output format?
Encryption output uses Base64 encoding by default, which is the most common and compact format. Key and IV inputs support auto-detection of Hex, Base64, or UTF-8 format — simply paste your key or IV and the tool will automatically recognize the format.
Security recommendations for AES encryption?
Use strong random keys (use the generate button). Prefer CBC or CTR mode over ECB. Use AES-256 for maximum security. Always use a unique IV for each encryption in CBC, CFB, CTR, and OFB modes. Never reuse the same key-IV combination.
Is my data sent to a server?
No, all encryption and decryption is performed locally in your browser using the CryptoJS library. Your data, keys, and IVs never leave your device.
What key sizes are supported?
AES supports three key sizes: 128 bits (16 bytes), 192 bits (24 bytes), and 256 bits (32 bytes). AES-128 is sufficient for most uses, AES-192 provides extra security margin, and AES-256 offers the highest security level recommended for classified data.
What is the difference between AES-128, AES-192, and AES-256?
The difference lies in key length and the number of encryption rounds: AES-128 uses 10 rounds, AES-192 uses 12 rounds, and AES-256 uses 14 rounds. AES-256 provides the strongest security but is slightly slower. For most applications, AES-128 is already considered unbreakable with current technology.
What is the history of AES and where is it used?
AES was selected by NIST in 1997 to replace DES, and became an official standard in 2001. It is now used worldwide by governments, militaries, and financial institutions. AES secures HTTPS connections, WiFi networks, disk encryption, and archive files. It is considered one of the most secure encryption algorithms ever created.
Why is ECB mode not recommended?
ECB mode encrypts identical plaintext blocks into identical ciphertext blocks, which reveals patterns in the data. For example, encrypting an image with ECB will still show the image outline. This makes ECB vulnerable to pattern analysis attacks. Always use CBC, CTR, CFB, or OFB mode with a random IV instead.
What are real-world applications of AES?
AES is used in HTTPS/SSL for secure web browsing, WPA2/WPA3 for WiFi security, VPN connections, Bluetooth encryption, encrypted messaging apps, disk encryption (BitLocker, FileVault), compressed archives (ZIP, RAR), and government classified document protection.
What is the difference between Hex and Base64 output?
Hex (hexadecimal) represents binary data using 16 characters (0-9, A-F), resulting in longer strings. Base64 uses 64 characters (A-Z, a-z, 0-9, +, /) and is about 33% shorter than Hex for the same data. Both are common formats for representing binary data as text. Choose based on your system requirements.
How to Use AES Encryption / Decryption
Encrypt and decrypt text with AES entirely in your browser — keys and data are never uploaded. Choose a mode and padding, enter your key, and get Base64 output instantly.
- Paste your plaintext or ciphertext into the field 'Enter text to encrypt or ciphertext to decrypt...'.
- Pick a mode under 'Encryption Mode' — 'CBC (Cipher Block Chaining)' is the common default; 'ECB (Electronic Code Book)' is less secure.
- Type your secret in the 'Key' field ('Enter encryption key...') and choose its size — 128, 192, or 256 bits.
- Fill the 'IV / Nonce' field for CBC, CFB, CTR, or OFB; the hint 'ECB mode does not require IV' appears when ECB is selected.
- Select a padding such as 'Pkcs7' or 'ZeroPadding', then read the output in the 'Result will appear here...' area.
Decryption must use exactly the same mode, padding, key, and IV as encryption — otherwise you get garbled output, so store all four values together.
Related Tools
- Text Encryption Secure text encryption and decryption with AES-GCM/AES-CBC. Password-based, browser-only processing, no data leaves your device.
- File Hash Checker Calculate and verify MD5, SHA-1, SHA-256, SHA-512 file hashes locally
- Hex Viewer View file contents in hex dump format with search, offset navigation, and virtual scrolling
- PDF Unlock Remove password protection from PDF files instantly in your browser. Includes smart brute-force password recovery.
- Protect PDF Add password protection to PDF files online for free. Encrypt PDF documents with AES-256 encryption to prevent unauthorized access. 100% browser-based, no upload required.
- Basic Auth Header Generator Generate HTTP Basic Authentication headers online — encode username:password to Base64 Authorization header instantly
- RSA Key Generator Generate RSA key pairs with 2048, 3072, 4096 bit sizes. PEM format output with fingerprint. Runs entirely in your browser.
- Brotli Compressor Free online Brotli compressor. Compress files to .br with quality 0–11 or decompress .br back to the original. Runs entirely in your browser — no upload, no install.