AES Encrypt / Decrypt
Cryptography & SecurityAES Encrypt / Decrypt
How to Use This Calculator
How to Use AES Encrypt / Decrypt
This tool encrypts and decrypts text using AES-256-GCM, one of the strongest symmetric encryption algorithms available. AES (Advanced Encryption Standard) was selected by NIST in 2001 after a five-year public competition and has become the most widely used encryption algorithm in the world. All encryption happens in your browser -- your data and password are never sent to any server.
Encrypting Text
Select Encrypt mode, enter a strong password, type or paste your plaintext message, and click Encrypt. The tool derives a 256-bit encryption key from your password using PBKDF2 with 100,000 iterations of SHA-256. A random 16-byte salt and 12-byte IV are generated for each encryption, ensuring the same plaintext encrypted twice produces different ciphertext. The output is a Base64-encoded string containing the salt, IV, and ciphertext.
Decrypting Text
Switch to Decrypt mode, enter the same password used for encryption, paste the Base64-encoded ciphertext, and click Decrypt. The tool extracts the salt and IV from the ciphertext, derives the same key using PBKDF2, and decrypts using AES-256-GCM. If the password is wrong or the ciphertext is tampered with, decryption will fail with an error.
AES Key Sizes: 128, 192, and 256
AES supports three key sizes: 128-bit (10 rounds), 192-bit (12 rounds), and 256-bit (14 rounds). All three are considered secure, but AES-256 provides the highest security margin and is required by the U.S. government for TOP SECRET classified information. This tool uses AES-256, which means your encryption key is 256 bits long, providing 2^256 possible key combinations -- a number so large that brute-force attacks are infeasible even with all the computing power on Earth.
Modes of Operation: GCM vs CBC
AES is a block cipher that operates on 128-bit blocks. A mode of operation defines how to encrypt data larger than a single block. CBC (Cipher Block Chaining) was the traditional choice, where each plaintext block is XORed with the previous ciphertext block before encryption. However, CBC requires separate integrity checking and is vulnerable to padding oracle attacks if not implemented carefully. GCM (Galois/Counter Mode), used by this tool, combines encryption with built-in authentication, detecting any tampering with the ciphertext automatically. GCM is the recommended mode for modern applications.
The Importance of the IV
The Initialization Vector (IV) ensures that encrypting the same plaintext with the same key produces different ciphertext each time. For AES-GCM, the IV must be 12 bytes and must never be reused with the same key. Reusing an IV in GCM mode is catastrophic -- it allows an attacker to recover the authentication key and potentially the plaintext. This tool generates a fresh random IV for every encryption operation, preventing IV reuse.
Real-World Usage
AES encryption secures most of the data you interact with daily. HTTPS/TLS connections use AES-GCM to encrypt web traffic between your browser and servers. Full-disk encryption tools like BitLocker (Windows) and FileVault (macOS) use AES-256 to protect data at rest. Wi-Fi networks secured with WPA2/WPA3 use AES for wireless encryption. VPN protocols like WireGuard and IPsec rely on AES for tunnel encryption. Messaging apps, cloud storage services, and password managers all use AES as their core encryption algorithm.
Frequently Asked Questions
Q: Is this encryption secure?
A: Yes, AES-256-GCM is approved by NIST and used by governments and military organizations worldwide. Security depends primarily on your password strength -- use a long, random password for best protection.
Q: Can I decrypt on a different device?
A: Yes. Copy the Base64 output and use this same tool on any device with the correct password. The salt and IV are embedded in the output, so no additional information is needed.
Q: What happens if I enter the wrong password?
A: Decryption will fail with an authentication error. AES-GCM detects incorrect keys or tampered ciphertext and refuses to produce output, preventing partial or corrupted decryption. This is a security feature of authenticated encryption.
Q: Why use PBKDF2 instead of hashing the password directly?
A: PBKDF2 applies SHA-256 iteratively (100,000 times in this tool) to derive the encryption key from your password. This deliberate slowness makes brute-force password guessing attacks much more expensive. A direct hash would allow an attacker to test millions of password guesses per second, while PBKDF2 limits attempts to a few thousand.
Q: Is AES encryption the same as end-to-end encryption?
A: AES is the encryption algorithm, while end-to-end encryption (E2EE) is an architecture where only the communicating parties can decrypt the data. E2EE systems typically use AES for the actual data encryption, combined with public-key cryptography for key exchange. This tool provides client-side AES encryption, which is conceptually similar since your data is encrypted before it could be shared.