Text Encryption Tool
Encrypt and decrypt text with a passphrase in your browser, using AES-256-GCM and PBKDF2 with 600,000 iterations. Nothing is uploaded. Honest limits explained.
Use a long passphrase, such as five or more random words. Nobody can recover a forgotten passphrase, and the encrypted text is only as strong as it is.
How to encrypt and decrypt text
- Type or paste your message in the first box, or click Open a .txt file.
- Enter a Passphrase, and the same one again in Confirm the passphrase (for encryption). Tick Show the passphrases to check what you typed. The strength line gives a rough idea of how hard the passphrase is to guess.
- Click Encrypt. Deriving the key takes about a second on purpose (see below). The Result is a block of text that starts with BEGIN ENCRYPTED TEXT. Copy it into an email, a chat or a note, or Download .txt to keep it as a file.
- To read it back, paste the whole block (or open the .txt file) in the first box, enter the passphrase and click Decrypt. The confirmation box is not needed for decryption.
If the passphrase is wrong, or if even one character of the block was changed, you get a clear error instead of garbled text.
What happens to your text
Everything runs in your browser with the built-in Web Crypto API. The text and the passphrase are never sent anywhere. The tool uses standard, well-reviewed building blocks:
- Key derivation: PBKDF2 with HMAC-SHA-256 and 600,000 iterations, the setting recommended by the OWASP Password Storage Cheat Sheet for PBKDF2-HMAC-SHA256. A new random 16-byte salt is generated for every encryption, so the same passphrase gives a different key each time and precomputed tables are useless. The 600,000 rounds make every guess of the passphrase slow for an attacker, and are the reason encryption takes a moment.
- Encryption: AES-256 in GCM mode (NIST SP 800-38D) with a fresh random 12-byte IV. GCM is authenticated encryption: a 16-byte tag detects any modification. The small header (format version, iteration count, salt and IV) is authenticated too.
- Output: Base64 with a header. The block states the format version, so future versions of this tool can still read today’s messages. Encrypting the same text twice gives two different blocks, which is expected.
Honest limits
This tool is meant for casual privacy: sending a Wi-Fi password to a friend, keeping a personal note unreadable to casual eyes, or sharing a short secret over a channel you do not fully trust, with the passphrase given another way (in person or by phone).
- The passphrase is everything. AES-256 itself is not the weak point; a guessable passphrase is. A short or common one can be cracked offline, despite the 600,000 iterations, by anyone who has the encrypted block. Use five or more random words, or a long random password from a generator. The strength estimate is only a hint: it cannot tell that “Summer2024!” is a common pattern.
- No recovery. There is no back door, no reset and no copy of your passphrase. Forget it, and the text is lost for good.
- Your device must be trustworthy. Malware, a browser extension or someone looking over your shoulder can read the text before it is encrypted.
- Metadata is not hidden. The length of the block reveals roughly the length of the message.
- Not a replacement for established tools. For files, backups, long-term archives or anything sensitive (legal, medical, business secrets), use audited tools built for it: age, GnuPG (OpenPGP), or the end-to-end encryption of a messenger such as Signal.
Frequently asked questions
Is this encryption secure?
The algorithms are the ones used by banks and governments, applied in the recommended way (random salt and IV, authenticated encryption). In practice, the security is that of your passphrase and of the device you use.
Why is my passphrase "wrong" when I am sure it is right?
Passphrases are case-sensitive and spaces count. Check Caps Lock and the keyboard layout (AZERTY or QWERTY), and make sure the whole block was copied, from BEGIN to END. A truncated or modified block gives the same error as a wrong passphrase, by design.
Can you decrypt my text if I lose the passphrase?
No. Nobody can: the passphrase is not stored anywhere, and trying every possibility is exactly what the design makes impractical.
Can I decrypt the block with another program?
The format is documented in the page and uses standard primitives: 1 version byte, a 4-byte iteration count, the 16-byte salt, the 12-byte IV, then the AES-GCM ciphertext and its 16-byte tag, all in Base64; the 33-byte header is passed as additional authenticated data. A developer can decrypt it with a few lines of code using OpenSSL, Python’s cryptography package or Web Crypto.
Is it better than a Caesar cipher or ROT13?
Completely different: those only disguise letters and are broken in seconds. AES-GCM with a strong passphrase is modern cryptography that cannot be broken by trying shifts or looking at letter frequencies.
Related tools
- Password Generator Free password generator that creates strong random passwords of 4 to 128 characters in your browser with a secure RNG. Nothing is stored or sent.
- Passphrase Generator Create strong, memorable passphrases from the EFF word list or a French list, with entropy shown in bits. Generated securely in your browser.
- Hash Generator Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of text or files of any size, and verify checksums. Everything runs in your browser.
- Caesar and ROT13 Cipher Encrypt and decrypt text with the Caesar cipher, ROT13 or ROT47, see the shifted alphabet, and crack an unknown key by testing all 25 shifts.