AES-256-GCM text encryption by password
- Free
- No sign-up
- No upload
- Works offline
Tool facts
- Saves as
TXT- Price
- Free, no sign-up, no watermark
- Are files uploaded?
- No. Everything is processed in this browser, on your device.
- Offline use
- Works without a connection once this page has loaded
- Built with
- Web Crypto
- Browser
- A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.
About AES Encrypt & Decrypt
AES Encrypt & Decrypt protects a piece of text with a password: it turns a note, a recovery code or a message into a single Base64 string that only someone with the same password can turn back into the original. It uses AES-256 in GCM mode, which encrypts and authenticates at the same time, so a wrong password or a modified string is detected instead of producing garbage.
The password is not used as the key directly. It is stretched with PBKDF2-HMAC-SHA256 and 210,000 iterations, the figure OWASP recommends for this function, and a fresh random 16-byte salt and 12-byte IV are generated for every encryption, so encrypting the same text twice gives different results. Everything is done with your browser's Web Crypto API; the text and the password never leave your device. The exact format is documented below so you can decrypt the output with other software.
AES Encrypt & Decrypt runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.
How to use AES Encrypt & Decrypt
- Choose Encrypt or Decrypt under Mode.
- Type or paste the text to encrypt, or the Base64 string to decrypt.
- Enter the password and click Encrypt or Decrypt (or press Enter in the password field).
- Copy or download the result. Swap moves the result into the input and switches the mode, which is a quick way to test that decryption works.
Frequently asked questions
What exactly is in the encrypted string?
It is Base64 of these bytes joined together: 1 version byte (0x01), a 16-byte random salt, a 12-byte random IV, then the AES-GCM ciphertext with its 16-byte authentication tag at the end. The key is PBKDF2-HMAC-SHA256 of the UTF-8 password with that salt, 210,000 iterations and 32 bytes of output. The version byte is passed to AES-GCM as additional authenticated data. Any library with PBKDF2 and AES-256-GCM, such as Python cryptography or Node.js crypto, can decrypt it.
What happens if I forget the password?
The text cannot be recovered. There is no backdoor and nothing is stored on a server. Keep the password in a password manager.
Why does decryption fail with the right password?
The string must be complete and unchanged. A missing character at the start or end, a line break added by an email client, or text encrypted by a different tool with another format will all fail the authentication check. Spaces and line breaks inside the Base64 are ignored, and URL-safe Base64 is accepted.
How strong is this encryption?
AES-256-GCM itself is considered unbreakable in practice. The weak point is the password: PBKDF2 slows each guess down, but a short or common password can still be found. Use a long random password or a passphrase of five or more random words.
Can I encrypt files?
This tool encrypts text. You can encrypt the Base64 form of a small file, but for files and backups use dedicated tools such as age, 7-Zip with AES-256 or VeraCrypt.