Text Encryptor

Encrypt and decrypt text with a password using AES-GCM via the Web Crypto API. Everything runs locally in your browser — your text and password never leave your device.

About the Text Encryptor

This tool encrypts and decrypts text using AES-GCM, a modern authenticated encryption algorithm, via the browser's built-in Web Crypto API. A cryptographic key is derived from your password using PBKDF2 with a random salt and 150,000 iterations. Each encryption uses a fresh random initialization vector (IV), so encrypting the same text twice never produces the same ciphertext.

How it works

  1. Encrypt — Your password is run through PBKDF2 to derive a 256-bit AES key. A random salt and IV are generated. The text is encrypted with AES-GCM, and the salt + IV + ciphertext are combined and encoded as Base64 for easy copy/paste.
  2. Decrypt — Paste the Base64 output back into the input box, enter the same password, and click Decrypt. The salt and IV are extracted, the key is re-derived, and AES-GCM authenticates and decrypts the message.

How to use it

  1. Type or paste your text into the input box.
  2. Enter a password. Remember it — there is no way to recover encrypted text without it.
  3. Click Encrypt to produce a Base64 ciphertext, or Decrypt to turn a ciphertext back into plaintext.
  4. Click Copy result to copy the output, or Clear to start over.

Frequently asked questions

Is my text or password uploaded anywhere? No. All cryptography happens locally in your browser through the Web Crypto API. Nothing is sent over the network.

What if I forget my password? There is no recovery. AES-GCM is secure — without the password, the ciphertext cannot be decrypted. Keep your password safe.

Why does the same text produce different output each time? Because a fresh random IV and salt are generated on every encryption. This is a deliberate security feature — it prevents attackers from correlating identical messages.

Can I share the ciphertext over email or chat? Yes. The output is plain Base64 text, safe to send through any channel. Only someone with the password can decrypt it.