Encrypt and decrypt text with a passphrase
This tool lets you encrypt and decrypt text with a shared passphrase directly in your browser. It uses the widely used CryptoJS library: the passphrase is turned into a key, the text is encrypted, and the result is a Base64 string you can paste into a message or file. Decrypting needs the same algorithm and the same passphrase.
Example
Encrypting Meet me at 7pm with AES-256 and the passphrase my secret passphrase produces something like:
U2FsdGVkX19Yj0D8GEjyFXy8uvR8Uu6m8Cr7BRf0N8w=Encrypt the same text again and the output changes, because a new random 8-byte salt is generated each time. The string always starts with U2FsdGVkX1 — Base64 for Salted__ — followed by the salt and the ciphertext.
How it works
- A random salt is generated.
- The passphrase and salt are fed through OpenSSL’s EVP_BytesToKey function (MD5-based) to derive a key and initialisation vector.
- The text is encrypted — for AES, with AES-256 in CBC mode and PKCS#7 padding.
- Salt and ciphertext are written in OpenSSL’s “Salted__” format and Base64 encoded.
Because the format is the same as OpenSSL’s, AES output can be decrypted on the command line with openssl enc -d -aes-256-cbc -a -md md5 (add -A for single-line input).
Algorithms
| Algorithm | Status |
|---|---|
| AES-256 | Modern standard cipher. Use this one. |
| Triple DES | Legacy; deprecated by NIST. For compatibility only. |
| DES | Broken — its 56-bit key can be brute-forced. Legacy testing only. |
| RC4 | Broken — biased output. Legacy testing only. |
| Rabbit | Stream cipher from eSTREAM; rarely used today. |
| Blowfish | 64-bit blocks; superseded by AES. |
Honest limits
This tool is good for learning, for testing code that uses CryptoJS or OpenSSL, and for casually obscuring a note. It is not a replacement for a dedicated encryption tool when the stakes are high:
- Weak key derivation. EVP_BytesToKey with a single MD5 round is fast, so a short or guessable passphrase can be brute-forced. Use a long, random passphrase — for example from the Password Generator.
- No integrity protection. CBC mode without a MAC cannot detect tampering; a modified ciphertext may decrypt to altered text or fail with a generic error.
- Key sharing is up to you. Anyone with the passphrase can decrypt. Never send it in the same message as the ciphertext.
For files or sensitive data, prefer established tools such as age, GnuPG or your operating system’s encrypted storage, which use authenticated encryption and slow, salted key derivation.
Privacy
Encryption and decryption run entirely in your browser, and nothing is sent to our server while you work. Save & Share is different: the link stores the text in the input editor (plain text or ciphertext) and the chosen algorithm on our server; the secret key is never stored in a shared link. If you only need a fingerprint rather than reversible encryption, use a hash such as the SHA-256 Hash Generator; for message authentication with a shared key, see the HMAC Generator.