AES Encrypt / Decrypt
100% LocalEncrypt and decrypt text with AES-256-GCM and PBKDF2 key derivation, 100% client-side.
Enter text to encrypt with AES-256-GCM. Set the key and IV, or let the tool generate them.
Learn More
AES Interoperability Across 7 Libraries: We Encrypted the Same Plaintext Everywhere and Compared Results
Browser Crypto Speed Test: Web Crypto API Benchmarks for AES, PBKDF2, and RSA in 2026
We benchmarked AES-GCM, AES-CBC, PBKDF2, and RSA key generation across Chrome, Firefox, and Safari to find which operations are fast enough for production use and which are surprisingly slow.
Base64 Encoding: When You Should and Shouldn't Use It (2026 Guide)
What is AES Encrypt / Decrypt?
Frequently Asked Questions
Technical Deep Dive
AES Encrypt / Decrypt
Protect sensitive text with AES-256-GCM encryption derived from a password via PBKDF2 (100,000 iterations, SHA-256). The salt and IV are packed into the base64 output so decryption only needs the ciphertext and password. Includes a random password generator and encryption metadata display. All processing is fully client-side.
The failure this tool prevents is pasting a production secret into a server-side “encrypt” box. AES-256-GCM here runs in Web Crypto. The password, derived key, and plaintext stay in this tab.
A typical payload is a Slack-bound API key: encrypt sk_live_… with a 16+ character passphrase spoken on a different channel. The Base64 blob is [16B salt][12B IV][ciphertext][16B tag].
Decrypting a flipped bit fails the GCM tag instead of returning garbage. If you need key rotation or audit logs, use a KMS, not this page.
01 Understanding GCM vs. Legacy Modes
| Mode | Type | Integrity Check | Security Profile |
|---|---|---|---|
| ECB | Block | None | Insecure, patterns leak |
| CBC | Chained | Needs HMAC | Vulnerable to Padding Oracle |
| GCM | Stream/Auth | Built-in Tag | Modern Standard |
02 Key Derivation via PBKDF2
A common mistake is using a password directly as an encryption key. Passwords lack the entropy required for AES. We use PBKDF2-SHA256 with 100,000 iterations to stretch your password into a cryptographically strong 256-bit key.
-
16-Byte Random Salt Prevents rainbow table attacks by ensuring every derived key is unique, even with identical passwords.
-
100,000 Iterations Makes brute-force attacks computationally expensive, requiring significant hardware resources per guess.
The Encrypted Output Structure
This tool packs everything into a single Base64 string for easy transmission. The receiver extracts the following components:
03 When You Should, and Shouldn't, Reach for This
Browser AES is the right tool for a narrow slice of crypto problems. Knowing the slice avoids both reinventing key management and pasting plaintext into the wrong solution:
-
Encrypting a short snippet to share over chat A staging-environment credential someone needs by tomorrow morning. Encrypt with a one-time password, send the ciphertext through Slack/email, share the password through a separate channel (signal, voice). Recipient decrypts with the same tool.
-
Adding a passphrase layer to an exported config You're exporting a Postman collection or
.envsnapshot for a contractor. Encrypt the file's contents first; their decryption still happens in a browser they trust. -
Teaching authenticated encryption A live demo, change one character of the ciphertext, watch the GCM auth tag reject it on decryption. Easier to internalize than reading the spec.
-
Production secrets at scale Use a KMS (AWS KMS, GCP Cloud KMS, Vault). They keep the master key in HSM-backed storage, audit every use, support rotation without re-encrypting data, and let you scope access via IAM. Passwords are a fundamentally weaker root-of-trust than HSMs.
-
End-to-end encrypted messaging Use Signal Protocol or libsignal. You need forward secrecy (a stolen key can't decrypt past messages), break-in recovery, asynchronous delivery, multi-device, none of which raw AES-GCM provides.
04 Worked Examples
STAGING_API_KEY=sk_live_b7d2c8a1...
9!kVz3qP-tL4mWn8
jK3vP9aF2sLqB7nE…dQ8mY1uG6oA4xR0z==
Send ciphertext over Slack; deliver the password through a separate channel. Even if Slack's transport is compromised, the channel separation prevents both halves leaking together.
jK3vP9aF2sLqB7nE…XQ8mY1uG6oA4xR0z==
↑ changed
OperationError: The operation failed for an
operation-specific reason
GCM rejects the entire message, you do not get a partial plaintext. This is the difference between GCM and CBC: with CBC + no HMAC, a flipped bit silently corrupts the plaintext, opening the door to padding-oracle attacks. GCM's all-or-nothing semantics prevent the entire class of failure.
enc DOES NOT SUPPORT GCMOpenSSL's enc command does not support authenticated encryption modes like GCM. Attempting openssl enc -aes-256-gcm will fail. This is a common pitfall, many online tutorials show this command, but it is incorrect.
$ openssl enc -aes-256-gcm -pbkdf2 -iter 100000 -salt -in plain.txt -out cipher.bin
Cipher not supported.
OpenSSL supports AES-GCM through the EVP API or cms command, but not through enc. For CLI-based AES-GCM encryption, use a scripting language with proper GCM support:
# Node.js example using the same Web Crypto primitives:
node -e "
const crypto = require('crypto');
const cipher = crypto.createCipheriv('aes-256-gcm', key, iv);
const ct = cipher.update(plaintext, 'utf8', 'hex');
cipher.final();
console.log(ct + ':' + cipher.getAuthTag().toString('hex'));
"This tool's output format (salt+IV+ciphertext+tag packed in Base64) is browser-specific. For production CLI workflows, use a KMS or a scripting language with native GCM support.
05 Related Tools
Encryption is rarely a single step. The companions below cover the password the cipher depends on, the key formats around it, and the storage layer past it:
Password Generator
Generate the password protecting the encryption. AES-256 with a 6-char password isn't AES-256 in practice.
RSA Key Generator
When you need asymmetric encryption (different keys for sender/receiver) or signatures rather than symmetric AES.
Hash Generator
SHA-256, SHA-512, BLAKE2 for integrity checks, when you need to verify a payload, not encrypt it.