AES Text Encrypt/Decrypt

Encrypt text with AES-256-GCM and a password — decrypt it back only with the same password.

Processed locally — files never leave your device

AES-256-GCM, key derived with PBKDF2 (100,000 rounds of SHA-256, random 16-byte salt, random 12-byte IV). The wrong password cannot decrypt — there is no password recovery.

Works offline once loaded Uploaded: 0 bytes

Encrypt any text with AES-256-GCM and a password, and decrypt it back only with the same password. Paste your message, enter a password, and copy the Base64 ciphertext — or paste a ciphertext back in and recover the original. Everything runs in your browser; the text never leaves your device.

The key is derived from your password with PBKDF2, 100,000 iterations of SHA-256, and a fresh random salt and IV every time. For whole files, use the File Encryptor (AES), and for a strong password to begin with, the Password Generator.

How to use

  1. Type or paste the text you want to protect.
  2. Enter a strong password — the same one will be needed to decrypt.
  3. Click Encrypt to get a Base64 ciphertext you can copy or share.
  4. To decrypt, paste the ciphertext, enter the same password and click Decrypt.

Why use Toolsvine

A password-protected note should stay protected even if the ciphertext is posted in public, and that is what authenticated encryption buys: AES-256-GCM does not just scramble the text, it seals it, so a wrong password or a single damaged character is detected instead of silently producing garbage. This tool exists to do that properly — real PBKDF2 key derivation, a fresh salt and IV every time — instead of the toy “encryption” that hides text behind a reversible shuffle.

How does AES-256-GCM encryption work here?

Your password is stretched into a 256-bit key with PBKDF2 using 100,000 iterations of SHA-256 and a fresh 16-byte random salt, which makes guessing the password slow even for an attacker with a fast computer. That key then encrypts the text with AES-256-GCM and a fresh 12-byte random initialization vector.

GCM appends a 16-byte authentication tag that proves the ciphertext has not been tampered with.

The output is one Base64 string holding the salt, the IV, and the ciphertext with its tag, in that order — 16 bytes, then 12 bytes, then the encrypted text plus the 16-byte tag. Decryption reverses the layout, re-derives the same key from your password and the stored salt, and checks the tag before returning anything: a wrong password or a damaged ciphertext fails the check and decrypts to nothing.

Worked example

Encrypt the 22-character message “Dallas office, 3:00 PM” and the ciphertext is 38 bytes — the 22 bytes of text plus the 16-byte authentication tag. Packed with the 16-byte salt and the 12-byte IV, the whole bundle is 66 bytes, which Base64-encodes to 88 characters. Encrypt the same message again with the same password and the output is completely different, because the salt and IV are drawn fresh every time.

AES text encryption example: a 22-character message becomes 38 bytes of ciphertext packed with salt and IV into 88 Base64 characters
Worked example: 22 characters of text become 38 bytes of ciphertext, packed into 88 Base64 characters.

What happens if I forget the password?

The text is gone. There is no backdoor, no recovery question, and no master key — the key exists only as a function of your password, and without it the ciphertext is indistinguishable from random bytes. That is the whole point of real encryption, and it is also the risk.

Keep the password somewhere safe and separate from the ciphertext: a password manager is the obvious choice, and for a message that must survive you, a sealed envelope with a trusted person. Never store the password in the same place as the ciphertext — the two together are the same as no encryption at all.

Frequently asked questions

Is my text uploaded anywhere?

No. The encryption and decryption run entirely in your browser with the Web Crypto API, and the text, the password, and the ciphertext never leave your device. There is no server, no account, and no log. You can encrypt a message offline once the page has loaded, and nobody else can see any of it.

Can I decrypt text encrypted somewhere else?

Only if the other tool used the same format: PBKDF2 with 100,000 iterations of SHA-256, a 16-byte salt, a 12-byte IV, AES-256-GCM, and the layout salt, then IV, then ciphertext with its tag, all Base64-encoded. The File Encryptor on this site uses the same format for files, so the two are compatible in structure but not interchangeable, since one handles text and the other handles raw bytes.

Why does the same text encrypt differently each time?

Because the salt and the initialization vector are drawn fresh at random for every encryption. The same password and the same message therefore produce a different ciphertext every time, which also means an attacker cannot tell whether two ciphertexts hide the same message. That randomness is a feature, not a bug — it is what makes the encryption secure.

How strong is this encryption?

AES-256 is the standard that protects government and banking data, and with a strong password it is effectively unbreakable by brute force. The weak point is the password, not the cipher: a short or common password can be guessed no matter how good the cipher is, so use a long passphrase or a password from the Password Generator, and keep it secret.

What is the Base64 output for?

Base64 turns the encrypted bytes into plain text characters that survive being copied, pasted, emailed, or posted anywhere text survives. The ciphertext itself is binary and would be corrupted by a text field; Base64 keeps it intact. Paste the whole Base64 string back into the decryption box, with the same password, and the original text returns.