UTILS.
Private by default
🔒

AES Text Encryption

Encrypt and decrypt text with a passphrase using AES-GCM and PBKDF2.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

AES Text Encryption turns a message into an encrypted Base64 string using a passphrase, and turns it back again. It uses AES-256 in GCM mode through the browser's Web Crypto API. The key is not your passphrase itself: it is derived from the passphrase with PBKDF2 (SHA-256, 600,000 iterations) and a random 16-byte salt, and a random 12-byte IV is generated for every encryption.

To encrypt, type your text, enter a passphrase and press Encrypt. The output is one Base64 string holding the salt, the IV and the ciphertext with its authentication tag, in that order. Because the salt and IV are random, encrypting the same text twice gives different output, which is normal. To decrypt, paste that string into the message box, enter the same passphrase and press Decrypt. Output made earlier with 100,000 iterations is still accepted.

GCM authenticates the data, so a wrong passphrase or any changed character gives a single decryption failed message instead of garbage text, and the tool cannot say which of the two it was. There is no recovery: if you forget the passphrase, the text cannot be decrypted. The passphrase box is plain text, so check that nobody can see your screen. Input is treated as UTF-8 text, so this suits notes and snippets rather than files, and the string layout is specific to this tool, so it will not decrypt output from OpenSSL or other programs. Security rests on a long, unique passphrase.

Frequently asked questions

How is the key derived?
A 256-bit AES-GCM key is derived from your passphrase using PBKDF2 with 600,000 iterations and a random salt.
What does the output contain?
The Base64 output bundles the random salt, the random IV and the ciphertext, so decryption needs only that text plus the passphrase.
What if I forget the passphrase or get an error?
Nothing can recover the text without the exact passphrase. A failure message means the passphrase is wrong or the pasted Base64 was changed or cut short; check for missing characters and extra spaces.
Can I decrypt this with other software?
Not directly. The salt, IV and ciphertext are packed in this tool's own layout, so other programs would need to split them the same way and derive the key with the same PBKDF2 settings.

More tools