How to use the AES encryption tool
- Choose Encrypt, type or paste your text, and enter a password.
- Press Encrypt. The result is a block of base64 text that you can copy and store or send.
- To read it again, choose Decrypt, paste the base64 text, enter the same password and press Decrypt.
Everything runs in your browser. Nothing you type is sent to our servers. The password is kept only in the page's memory and is forgotten when you leave or reload.
What the tool does to your text
Your password is not used as the key directly. The tool generates a random 16-byte salt and runs the password through PBKDF2 with SHA-256 and 100,000 iterations to produce a 256-bit key. The salt means the same password gives a different key every time, and the iterations make guessing passwords slow.
The text is then encrypted with AES-256 in GCM mode using a random 12-byte nonce (IV). GCM also produces a 16-byte authentication tag, which is how decryption can tell a wrong password or edited data from the real thing.
The output is the salt, then the IV, then the encrypted text and tag, joined and written as base64. Because the salt and IV are random, encrypting the same text twice gives two different results. Both still decrypt to the same text.
| Bytes | Contents |
|---|---|
| 0 to 15 | Salt for PBKDF2 |
| 16 to 27 | AES-GCM nonce (IV) |
| 28 to end minus 16 | Ciphertext |
| Last 16 | GCM authentication tag |
Decrypting the output in your own code
Because the format is standard, you can decrypt text from this tool anywhere that has AES-GCM and PBKDF2. This Node.js function reverses it exactly. It is tested against the tool's output.
const { pbkdf2Sync, createDecipheriv } = require("node:crypto");
function decrypt(base64Text, password) {
const buf = Buffer.from(base64Text, "base64");
const salt = buf.subarray(0, 16);
const iv = buf.subarray(16, 28);
const tag = buf.subarray(buf.length - 16);
const data = buf.subarray(28, buf.length - 16);
const key = pbkdf2Sync(password, salt, 100000, 32, "sha256");
const decipher = createDecipheriv("aes-256-gcm", key, iv);
decipher.setAuthTag(tag);
return Buffer.concat([decipher.update(data), decipher.final()]).toString("utf8");
}How safe is it?
AES-256-GCM itself is not the weak point. The strength of the result depends almost entirely on the password, because anyone with the base64 text can try passwords offline. A long passphrase of four or more random words is far harder to guess than a short password with symbols.
This tool is useful for protecting a note or a snippet you need to send or store. It is not a replacement for a password manager or for encryption built into your application, where keys should come from a key management service rather than a typed password.
When you would use it
- Sending a short secret, such as a Wi-Fi password or a recovery code, over a channel you do not fully trust, and sharing the password separately.
- Keeping a private note in a shared document or repository where only people with the password should read it.
- Checking your own AES-GCM implementation against a known-good one while learning or debugging.
Frequently asked questions
Why is the result different every time I encrypt the same text?
A new random salt and IV are generated for each encryption. That is deliberate: it stops anyone telling that two messages are the same. Every version decrypts back to the original text with the right password.
What happens if I enter the wrong password?
Decryption fails with an error. AES-GCM checks an authentication tag, so a wrong password or a changed character in the base64 text is detected rather than producing scrambled output.
Can you recover my text if I forget the password?
No. The password is never sent or stored, and there is no back door. Without the password the text cannot be decrypted.
Is this AES-128, AES-192 or AES-256?
AES-256 in GCM mode. The key is 256 bits, derived from your password with PBKDF2-SHA-256 and 100,000 iterations.
Can I decrypt the output with OpenSSL?
Not with the openssl enc command, because it does not support GCM. Use a library instead, such as Node.js crypto (example above), Python's cryptography package or .NET's AesGcm class, and split the bytes as shown in the table.