
AES Encrypt / Decrypt
AES-256-GCM encryption with PBKDF2 key derivation. Runs 100% in your browser using the Web Crypto API.
Last reviewed: April 2026New to this tool? Click here for instructions
How to Use the AES Encryption Tool
To use the AES Encryption Tool, follow these steps:
1. Choose a direction: "Encrypt" to convert plaintext to Base64-encoded ciphertext, or "Decrypt" to reverse it.
2. Enter a password. The strength indicator shows how secure your password is. Use a mix of upper/lowercase, digits, and symbols for maximum security.
3. Paste your text into the input area.
4. Click Encrypt/Decrypt - the result appears on the right.
5. Copy or download the result. To decrypt later, you need both the Base64 output and the exact same password.
When to Use AES vs. RSA
Use AES when you need to encrypt personal data for your own use or share encrypted messages with someone you can securely share a password with.
Use RSA when you need to exchange data with someone you haven't pre-shared a secret with. RSA is suitable for establishing a shared secret, which can then be used with AES for bulk data encryption.
How It Works
When you click Encrypt, this tool performs the following steps using the browser's native window.crypto.subtle API:
1. Generate a cryptographically random 16-byte salt.
2. Derive a 256-bit AES key from your password using PBKDF2 with HMAC-SHA256, 600,000 iterations, and the salt.
3. Generate a cryptographically random 12-byte IV (nonce).
4. Encrypt the plaintext using AES-256-GCM with the derived key and IV.
5. Concatenate salt + IV + ciphertext and encode as Base64. Decryption extracts the salt and IV from the Base64 payload, re-derives the key from your password, and decrypts. The GCM authentication tag is verified automatically.
Tips, Edge Cases, and Limitations
Password Strength Matters: AES-256 is theoretically unbreakable, but weak passwords are still vulnerable to dictionary attacks even with PBKDF2 stretching. Use a random passphrase of 4+ words or a 20+ character random string.
No Data Sent to Server: This tool runs entirely in your browser and does not send any data to a server. Your data is encrypted locally and never transmitted.
Limitations: This tool is intended for educational purposes. For production applications, use a professionally audited encryption library.
IV (Initialization Vector): The IV is a 12-byte value that is unique for each encryption operation. It is generated randomly and included in the encrypted output.
Security Considerations: Always use strong passwords and avoid sharing them via untrusted channels. Never store private keys or passwords in unsecured locations.
Frequently Asked Questions
Quick reference
| Parameter | Description | Example |
|---|