AES Text Encryptor

Encrypt and decrypt text with AES-256-GCM and a passphrase, all in your browser.

Lock a message with a passphrase using AES-256-GCM, and unlock it again later. Your passphrase is stretched into a key with PBKDF2 and a fresh random salt each time, so the same message encrypts differently every run. The output is plain text you can paste into an email or a note. Everything happens in your browser.

How to use it

  1. Choose encrypt or decrypt.
  2. Enter a strong passphrase.
  3. Enter the text, or the encrypted text to decrypt.
  4. Press Run and copy the result.

When it helps

  • Sending a sensitive note over an ordinary channel.
  • Keeping a private message in a notes app.
  • Seeing how modern encryption works.
  • Protecting a short secret.

Good to know

  • The passphrase is the only key. Lose it and the text can't be recovered by anyone.
  • Use a long passphrase of several random words.
  • Send the passphrase by a different route from the encrypted text.

How the encryption works

Your passphrase is stretched into a 256-bit key using PBKDF2 with SHA-256 and 250,000 iterations, which makes guessing slow. AES-GCM then encrypts your text and adds an authentication tag, so any change to the encrypted text is detected when you decrypt.

Each encryption uses a fresh random salt and nonce, so encrypting the same text twice gives different output.

Worked example: sending a note

Write a note, enter a passphrase of several random words, and press Run. You get a string beginning with v1 followed by Base64 text. Send that by email, and tell the recipient the passphrase in a phone call. They paste the string, enter the passphrase, choose Decrypt, and read the note.

If anything in the string is changed, decryption fails.

Passphrase advice

The strength of the encryption is limited by your passphrase. Use at least five random words or 16 random characters. Don't use anything personal. A password manager can generate and store one.

If the passphrase is guessable, an attacker can try guesses against the encrypted text offline.

What this isn't

This tool encrypts short text in your browser. It isn't a replacement for end-to-end encrypted messaging, full-disk encryption or a vault for important data. It can't protect a device that's already compromised.

For files, use dedicated tools. For ongoing secure conversations, use an encrypted messenger.

Sharing safely

Share the encrypted text and the passphrase through different channels, such as email for one and a call or a message app for the other. Agree on how long the information should be kept, and delete copies afterwards.

For anything critical, use a tested secure messaging app or an encrypted file vault.

A quick safety check

Before relying on an encrypted note, decrypt it once yourself with the same passphrase in a fresh browser tab. If it comes back correctly, you know the passphrase and the text were copied properly and nothing was cut off.

Questions

Is it secure?

It uses standard AES-256-GCM, but the strength depends on your passphrase.

What happens with the wrong passphrase?

Decryption fails with a clear message.