Skip to content

Encrypt and decrypt plaintext with AES-GCM or AES-CBC and PBKDF2 passphrase derivation locally.

Loading tool

About Text Encryption

Encrypt and decrypt text with a passphrase using AES-GCM or AES-CBC with 128, 192 or 256-bit keys, via the browser's Web Crypto API. The key is derived with PBKDF2-SHA256 (310,000 iterations by default, adjustable) and a random 16-byte salt, and the output is a single Base64 payload of salt, IV and ciphertext. Decrypting needs the same passphrase, algorithm, key size and iteration count; the passphrase and plaintext never leave your browser.

Common uses

  • Encrypt a note or secret before storing it somewhere you do not fully trust.
  • Send a password-protected message and share the passphrase through a separate channel.
  • Decrypt a payload previously produced by this tool.
  • Learn how salt, IV and PBKDF2 iterations fit together in passphrase-based encryption.

FAQ

Should I use AES-GCM or AES-CBC?
AES-GCM is authenticated encryption: decryption fails if the ciphertext was modified. AES-CBC provides confidentiality only and needs a separate MAC to detect tampering, so GCM is the better default.
Why does decryption fail?
Usually the passphrase is wrong, or the algorithm, key size or iteration count differs from what was used to encrypt. With AES-GCM, any change to the payload also causes decryption to fail.
Can payloads be decrypted with other tools?
Yes, if the other tool follows the same layout: a 16-byte salt, then the IV (12 bytes for GCM, 16 for CBC), then the ciphertext, all Base64-encoded, with the key derived by PBKDF2-SHA256 using the same iteration count.
How strong is passphrase encryption?
AES itself is not the weak point; the passphrase is. PBKDF2 slows guessing down, but a short or common passphrase can still be brute-forced, so use a long, random one.