🔒 Text Encryption Tool
Encrypt and decrypt text with AES-GCM and a password. Powered by the browser's native Web Crypto API — your text and password never leave your device.
About the Text Encryption Tool
This tool encrypts and decrypts text using AES-GCM (a modern authenticated cipher) with a key derived from your password via PBKDF2 with SHA-256 and 100,000 iterations. Everything runs in your browser through the native window.crypto.subtle API — no text or password is ever sent to a server.
How the encrypted output is structured
Each encrypted result is a single Base64 string that bundles everything needed to decrypt (except the password):
- Salt (16 bytes) — random per encryption, used to derive the key from your password.
- IV (12 bytes) — random per encryption, required by AES-GCM and never reused.
- Ciphertext + auth tag — the encrypted bytes plus the GCM authentication tag.
To decrypt, paste the Base64 string back, enter the same password, and the tool will split out the salt and IV, re-derive the key, and verify the auth tag. If the password is wrong (or the data was tampered with), decryption fails safely.
How to use it
- Choose Encrypt or Decrypt from the mode dropdown.
- Type a password — the same password must be used to decrypt later.
- Paste your text into the text box.
- Press the action button. The result appears below; copy it with one click.
Frequently asked questions
Can the password be recovered if I forget it? No. The key is derived from your password locally; there is no recovery mechanism and no server that knows it. Keep your password safe.
Is this as secure as a dedicated app? The cryptographic primitives are the same ones browsers use for TLS, so the math is sound. The main risk is a weak password — use a long passphrase.
Why does decryption fail sometimes? The most common cause is a wrong password. It can also fail if the Base64 string was truncated, mangled by an editor, or if the text was encrypted with a different tool.
Is anything uploaded? No. The crypto runs entirely in JavaScript on your device.