Boneyard Tools

AES Text Encryption

Encrypt any text with a password and get it back later with the same password. This uses AES-GCM with a 256-bit key derived from your password using PBKDF2, the same approach trusted apps use to protect notes and files. It runs entirely in your browser, so the text and password never leave your machine.

How to encrypt text with AES

  1. Paste the text you want to protect and type a strong password.
  2. Keep the mode on Encrypt and copy the base64 output that appears.
  3. To read it back, switch to Decrypt, paste that output, enter the same password, and copy the original text.

Examples

Encrypt then decrypt a message

Encrypt "hello world" with password "correct horse battery staple"
A base64 string such as "k3F2...". Decrypt that string with the same password to get "hello world" back.

Frequently asked questions

How does this encryption work?

It uses AES-GCM with a 256-bit key. The key is not your password directly: PBKDF2 with SHA-256 and 100000 iterations stretches your password together with a random salt into the key. A fresh random salt and IV are generated for every encryption, so encrypting the same text twice gives different output, and AES-GCM also authenticates the data so tampering is detected.

Is my text or password sent to a server?

No. Encryption and decryption run locally in your browser with the Web Crypto API. Your text and password never leave your machine, and nothing is logged or uploaded.

What happens if I forget the password?

There is no recovery. The password is the only thing that can derive the key, and it is never stored anywhere. If you lose it, the ciphertext cannot be decrypted by anyone, including us. Save your password somewhere safe before you close the page.

Why does the same text produce a different result each time?

A new random 16-byte salt and 12-byte IV are generated on every encryption and packed into the output. That randomness is required for AES-GCM to be secure, and it means identical plaintext never produces identical ciphertext. Decryption reads the salt and IV back out of the payload automatically.

What is in the base64 output?

The output is base64 of the salt (16 bytes), the IV (12 bytes), and the AES-GCM ciphertext with its authentication tag, concatenated in that order. That is everything needed to decrypt the message given the right password.

Why did decryption fail?

Decryption fails with a wrong password, or if the encrypted text was altered or truncated even slightly. AES-GCM verifies an authentication tag, so it refuses to return partially correct or tampered data. Paste the full, unmodified output and use the exact password you encrypted with.

Related tools