Encrypt & Decrypt Text
runs in your browserno sign-upfree
Encrypt text with a password using AES-256-GCM, and decrypt it again. Share secrets safely — everything happens in your browser, nothing is uploaded.
Decrypt it in your own code (Node.js, Python)
The encrypted text is Base64 of: version (1 byte) · PBKDF2 iterations (4 bytes) · salt (16) · IV (12) · ciphertext with the 16-byte GCM tag. The key is PBKDF2-HMAC-SHA256 of the password, 32 bytes.
const crypto = require('node:crypto');
function decrypt(encrypted, password) {
const data = Buffer.from(encrypted, 'base64');
const iterations = data.readUInt32BE(1);
const salt = data.subarray(5, 21);
const iv = data.subarray(21, 33);
const tag = data.subarray(data.length - 16);
const key = crypto.pbkdf2Sync(password, salt, iterations, 32, 'sha256');
const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);
decipher.setAuthTag(tag);
return Buffer.concat([decipher.update(data.subarray(33, data.length - 16)), decipher.final()]).toString('utf8');
}# pip install cryptography
import base64, hashlib
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
def decrypt(encrypted: str, password: str) -> str:
data = base64.b64decode(encrypted)
iterations = int.from_bytes(data[1:5], "big")
salt, iv = data[5:21], data[21:33]
key = hashlib.pbkdf2_hmac("sha256", password.encode(), salt, iterations, 32)
return AESGCM(key).decrypt(iv, data[33:], None).decode()About this tool
Encrypt any text with a password so only people who know the password can read it — then decrypt it here (or in your own code) later. It uses AES-256-GCM, the same encryption used by banks and messaging apps, with the key made from your password by PBKDF2 (600,000 rounds), so guessing the password is slow. Encrypting the same text twice gives different results, and any change to the encrypted text — or a wrong password — is detected. Everything happens in your browser; nothing is uploaded or stored.
How to use
- Choose Encrypt, paste your text and type a strong password.
- Press Encrypt and copy the encrypted text — send or store it anywhere.
- To read it, choose Decrypt, paste the encrypted text, enter the same password and press Decrypt.
FAQ
How secure is it?
AES-256-GCM can’t be broken with today’s computers, so the password is the weak point. A long, unique password (12+ characters, or several random words) keeps the text safe even if someone copies the encrypted version. Send the password by a different channel than the text.
What if I forget the password?
The text can’t be recovered — by you, us or anyone else. There is no back door, and nothing is stored on our side.
Why is the result different every time?
Each encryption uses a new random salt and IV (starting value). That’s on purpose: it hides whether two messages are the same. Every version decrypts to the same text with the right password.
Can I decrypt it without this website?
Yes. The format is documented on this page and code is included for Node.js and Python, so your data never depends on this site.
Is this the same as hashing or Base64?
No. Base64 only changes how data is written — anyone can reverse it. A hash can’t be reversed at all. Encryption can be reversed, but only with the password.