AES Encrypt / Decrypt
PBKDF2 key derivation
OWASP recommends 600,000+ iterations for stronger security.
12 bytes (96-bit nonce) · Use a unique IV for every encryption with the same key.
AES-GCM provides both encryption and authentication — it can detect tampering. CBC and CTR provide confidentiality only; integrity must be verified separately. ECB is deterministic and leaks patterns — avoid it.
A unique IV must be used for every encryption with the same key. Reusing an IV with GCM can completely break security. This tool auto-generates a cryptographically random IV.
PBKDF2 derives a cryptographic key from your passphrase using a random salt and many iterations, making brute-force attacks expensive. The derived key, salt, and iterations must all be saved to decrypt later.
Overview
Encrypt and decrypt text with AES online, in your browser
Symmetrically encrypt and decrypt text online with AES-GCM, CBC, CTR, or ECB. Enter a passphrase or raw key — all processing runs in your browser and nothing leaves your device.
Guide
How to Use
- 1 Choose your encryption mode
The tool defaults to AES-GCM, which provides both encryption and authentication. Switch to CBC, CTR, or ECB if your use case requires it.
- 2 Enter your passphrase or key
Type a passphrase and the tool derives an AES key with PBKDF2. Or switch to Hex / Base64 format and paste a raw key of the exact required length.
- 3 Enter the text to encrypt or decrypt
Paste or type your message into the input area. For decryption, paste the ciphertext in the format it was produced (Base64 or Hex).
- 4 Click Encrypt or Decrypt
All processing happens in your browser — your data never leaves your device. The result appears instantly in the panel below.
- 5 Copy your results
Use the copy button next to each output field. To decrypt later, you need the ciphertext, IV, auth tag (GCM), and salt (if using a passphrase).
Reference
AES Mode Comparison
| Mode | Security | Authentication | Padding | IV bytes |
|---|---|---|---|---|
| AES-GCM | Recommended | Yes (AEAD) | None needed | 12 |
| AES-CBC | Acceptable | No | PKCS7 | 16 |
| AES-CTR | Acceptable | No | None needed | 16 |
| AES-ECB | Not recommended | No | PKCS7 | None |