Text Encryptor

Encrypt and decrypt text locally with AES-256-GCM using a passphrase. The key is derived from your passphrase and never leaves the browser, so the ciphertext is safe to share — nothing is ever uploaded.

Choose mode

Encryption and decryption must use the same passphrase. The key is derived locally with PBKDF2 (SHA-256, 100,000 iterations) and the passphrase is never uploaded. Memorize it well — without it the text cannot be recovered.

How to use

  1. Encrypt mode is selected by default: paste the text you want to secure into the box. Chinese, English, emoji and any other characters are supported.
  2. Enter a passphrase and click "Encrypt". The output below is a three-part ciphertext — salt.IV.ciphertext — which you can copy and share freely.
  3. To recover the text, switch to Decrypt mode, paste the complete ciphertext, type the original passphrase and click "Decrypt".
  4. Encrypting the same text with the same passphrase always yields a different result (a fresh salt and IV each time). This is a normal AES-GCM security feature.
  5. This tool uses the Web Crypto API, so it requires a secure context such as HTTPS or localhost.

FAQ

Is my text or passphrase uploaded to a server?
No. Encryption and decryption are performed entirely in your browser through the built-in Web Crypto API. Your text and passphrase never leave your device and nothing is logged or stored by this site.
Why does the same text produce a different result every time?
Each encryption generates a random 16-byte salt and a random 12-byte IV, so even identical input and passphrase yield different output. This is exactly what AES-GCM is designed for — it prevents replay and pattern analysis.
Can I decrypt if I forget the passphrase?
No. The decryption key is derived from your passphrase with PBKDF2 and is never stored, so there is no recovery path. The passphrase is the only way to restore the original text — keep it safe.
What are the dots inside the ciphertext?
The output format is three Base64 sections joined by dots: salt.IV.ciphertext. When decrypting, keep all three parts intact: if any part is missing or altered, or the passphrase is wrong, decryption fails with a clear message.

Related Tools