AES Encrypt / Decrypt
Encrypt and decrypt text with AES.
Features
Password-based keys
The password is stretched into a key with PBKDF2-SHA256 and 100,000 iterations, plus a random 16-byte salt, so the key is strong even for modest passphrases.
GCM or CBC
AES-GCM adds authentication so tampering is detected; AES-CBC is the widely compatible mode with PKCS#7 padding. Both run natively in the browser.
Self-contained output
Each result bundles the salt, the IV and the ciphertext into one string, so the same tool can decrypt it later without you tracking those values separately.
Why encrypt text in the browser
Encrypting a message locally keeps both the password and the plaintext on your own machine, which is the safest place for secrets you do not want indexed, logged or intercepted. AES is the standard symmetric cipher, so the result is interoperable in principle, and running it client-side means there is no account, no upload and no copy left on a server. Use it for quick local protection of notes, tokens or configuration — never as a substitute for transport security such as HTTPS.
What the settings mean
- >Key size — AES-128 and AES-256 differ in key length. Both are considered secure; 256 is the conservative choice and the default here.
- >Mode — AES-GCM authenticates the data and detects tampering; AES-CBC is broadly compatible but offers no integrity check on its own.
- >Output format — Base64 is compact and copy-paste friendly; Hex is longer but easy to inspect byte by byte. Both encode the same bundled salt, IV and ciphertext.
- >Password — Stretched with PBKDF2-SHA256 over 100,000 iterations and a random salt. Choose a strong passphrase; it cannot be recovered if lost.
Example
IN
Hello · password: "secret" · AES-256-GCM · BASE64
OUT
salt + IV + ciphertext, e.g. "Ld8K...n2Q=" (different on every run)
The first 16 bytes are the random salt and the next 12 are the IV; only the remainder is ciphertext. Because the salt and IV are random, encrypting the same text twice gives different output.
Frequently asked questions
Are my text and password uploaded?
No. All encryption and decryption happen in your browser tab with the Web Crypto API. The text and password are never sent to a server.
What is the difference between GCM and CBC?
AES-GCM is authenticated: it detects if the ciphertext was altered. AES-CBC only provides confidentiality and relies on PKCS#7 padding. GCM is the better default unless you need CBC for compatibility.
Why does the same input produce different output?
Every encryption generates a fresh random salt and IV, which are prepended to the ciphertext. That is normal and expected; decryption reads them back from the output.
Can I decrypt output produced by another tool?
Only if that tool uses the same layout (salt then IV then ciphertext), the same PBKDF2 settings (SHA-256, 100,000 iterations) and the same mode. The output here is not raw AES ciphertext on its own.
What happens with the wrong password?
Decryption fails and shows an error instead of revealing anything. AES has no way to recover a password, so keep the one you used.
Related tools
- >Hash Generator — Fingerprint text with SHA-1, SHA-256 or SHA-512.
- >JWT Decoder — Inspect JSON Web Tokens locally.
- >Base64 Encoder / Decoder — Encode and decode Base64 without leaving the browser.