AES Text Encryption
Encrypt and decrypt text with AES-256-GCM and a password.
The password never leaves your browser. Send it to the recipient separately from the encrypted text — sharing both through the same channel defeats the purpose.
Enter text and a password to encrypt.
About the AES Text Encryption
Encrypt text with a password using AES-256-GCM, and decrypt it again with the same password. The key is derived with PBKDF2 and everything runs through the browser's own Web Crypto implementation, so neither the password nor the plaintext ever leaves your device.
How to use it
- 1 Paste the text you want to protect and choose a strong password.
- 2 Copy the encrypted output — it contains the salt and IV it needs to be decrypted.
- 3 To decrypt, paste that output back and enter the same password.
- 4 Share the password through a different channel from the ciphertext.
What it does
- AES-256-GCM — authenticated, so tampering is detected
- PBKDF2-HMAC-SHA256 key derivation with 250,000 iterations
- A fresh random salt and IV for every message
- Base64 output that survives email and chat
- Runs entirely in your browser via the Web Crypto API
Frequently asked questions
Is this safe for real secrets?
The cryptography is standard and sound: AES-256-GCM with PBKDF2 at 250,000 iterations, implemented by your browser rather than by us. The weak point is never the cipher, it is the password and how you share it. A short or reused password can be brute-forced offline from the ciphertext, and sending the ciphertext and the password through the same channel defeats the whole exercise. For long-lived secrets shared between people, a password manager or age/GPG is the better answer.
Why does the encrypted output change every time?
A new random salt and initialisation vector are generated for each message. This is required: reusing an IV with the same key in GCM mode breaks the security of both messages. It also means identical plaintext produces different ciphertext, which prevents anyone inferring that two messages are the same.
What does 'could not decrypt' mean?
Either the password is wrong, or the ciphertext was altered or truncated. GCM authenticates the data, so it cannot tell you which — and deliberately does not guess, because a message that distinguished the two would help an attacker.
Can I decrypt this somewhere else?
Yes, if you reimplement the same scheme: the output is base64 of salt (16 bytes) followed by IV (12 bytes) followed by the GCM ciphertext and tag, with the key derived by PBKDF2-HMAC-SHA256 at 250,000 iterations. It is not compatible with OpenSSL's default enc format, which uses a different derivation.
Is the password sent anywhere?
No. Key derivation and encryption both happen in your browser. You can disconnect from the network and the tool still works.