What this tool does
Text Encrypt & Decrypt lets you protect any piece of text with a password using military-grade AES-256-GCM encryption. Everything happens directly in your browser using the built-in Web Crypto API. Your text and your password never leave your device, and nothing is sent to any server.
Whether you need to share a sensitive note securely, store a private message, or just explore how modern encryption works, this tool gives you a simple, private way to do it. Paste your text, choose a strong password, and get an encrypted block you can safely share or store anywhere.
To decrypt, switch to Decrypt mode, paste the encrypted text, enter the same password, and the original text is restored instantly.
How the encryption works
This tool uses AES-GCM (Advanced Encryption Standard in Galois/Counter Mode) with a 256-bit key. AES-256-GCM is authenticated encryption, meaning it both encrypts your data and verifies its integrity. If the encrypted text or password is tampered with, decryption will fail with an error rather than silently returning garbage.
The encryption key is never derived directly from your password. Instead, the tool uses PBKDF2 (Password-Based Key Derivation Function 2) with 100,000 iterations of SHA-256 to derive a strong cryptographic key from your password. This makes brute-force attacks significantly more expensive.
Each encryption operation generates a unique random 16-byte salt and a unique random 12-byte initialization vector (IV). These are prepended to the ciphertext and encoded together as a single base64 string. This means encrypting the same text with the same password twice produces different output every time, providing protection against pattern analysis.
The final encrypted output contains everything needed for decryption: salt, IV, and ciphertext, all encoded as base64.
How to use
1. Select Encrypt or Decrypt mode using the toggle at the top. 2. In Encrypt mode, type or paste the text you want to protect. 3. Enter a strong password. The stronger your password, the harder the encryption is to break. 4. Click Encrypt Text. The encrypted output appears below. 5. Copy the encrypted result using the Copy button and share or store it safely. 6. To decrypt later, switch to Decrypt mode, paste the encrypted text, enter the same password, and click Decrypt Text.
Tips for strong encryption
The security of your encrypted text depends heavily on your password. AES-256 itself is essentially unbreakable with current technology. The weak point is always the password.
Use a long, random password or passphrase. A sequence of four or more random words is both memorable and strong. Avoid dictionary words, names, or simple patterns. A password manager can help generate and store truly random passwords.
Keep your password separate from your encrypted text. If someone intercepts both, they have everything they need to decrypt your message.
This tool is best suited for short to medium-length texts. It is not designed as a file encryption tool. For files, consider dedicated software like VeraCrypt or GPG.
FAQs
Q: Is my data sent to a server? A: No. All encryption and decryption happens entirely in your browser using the Web Crypto API. Your text and password never leave your device.
Q: What encryption algorithm does this use? A: AES-GCM with a 256-bit key derived from your password using PBKDF2 with 100,000 iterations and SHA-256.
Q: Can I decrypt text encrypted by other tools? A: Only if they use the same format: PBKDF2-derived key with salt and IV prepended to the ciphertext, all base64-encoded. This tool's output is self-contained and uses a specific byte layout, so it is not directly compatible with other tools unless they match exactly.
Q: What happens if I enter the wrong password? A: AES-GCM is authenticated encryption. Decryption will fail with an error message rather than returning incorrect data. You will see a clear error telling you the password may be wrong or the text may be corrupted.
Q: Can I use this to encrypt passwords? A: You can, but a dedicated password manager is a better tool for that job. This tool is designed for encrypting text messages or notes, not for managing credentials.
Q: Is the encrypted text safe to share publicly? A: The encrypted text itself reveals nothing about the original content without the password. It is safe to share over email, chat, or public storage as long as you keep the password private and share it through a separate channel.
Q: Why does the same text produce different encrypted output each time? A: Each encryption uses a freshly generated random salt and IV. This is intentional and a feature of good cryptography. It prevents an attacker from noticing that two messages have the same content by comparing ciphertext.