Encrypt / Decrypt Text
CryptoAES-GCM encrypt and decrypt text with a passphrase via the browser-native Web Crypto API. Keys are derived from the passphrase with PBKDF2 (SHA-256); all processing stays local in your browser.
About Encrypt / Decrypt Text
When you want to lock a piece of text so only someone with the passphrase can read it, you need symmetric encryption. This tool implements AES encryption/decryption with the browser's Web Crypto API: you enter plaintext and a passphrase, the tool derives a key from the passphrase via a KDF like PBKDF2, then encrypts in AES-GCM mode and outputs ciphertext with a random IV (usually Base64). Decryption with the same passphrase restores it. Everything runs locally, and plaintext, passphrase, and key never leave the browser, making it ideal for temporarily encrypting a note, config, or secret before sending it over an ordinary channel. Tip: Bookmark this tool for quick access whenever you need to generate keys or hashes. All processing happens locally in your browser — no data upload, so it is safe to use with sensitive material.
How to Use
- Open the Encrypt / Decrypt Text tool page
- Enter or paste your data into the input area
- View the real-time results and use the copy button to get the output
Use Cases
- Encrypt sensitive notes — Turn a memo with passwords or keys into ciphertext so it is safe even in an ordinary notes app.
- Pass secure messages — Encrypt a message, send it via chat, and share the passphrase over a separate channel like a phone call.
- Protect config snippets — Encrypt connection strings before pasting into a ticket or doc to avoid plaintext exposure.
- Learn symmetric crypto — Observe how ciphertext changes with different passphrases and IVs for the same plaintext.
- Temporary archiving — Encrypt sensitive text you do not need now, then decrypt with the passphrase later.
- Share credentials — Encrypt a password or API key and send the ciphertext over email, then share the passphrase by phone.
- Client-side decrypt — Decrypt a config file that was encrypted offline to inspect its contents without server-side tools.
FAQ
Which encryption algorithm is used?
The tool uses AES-GCM, a modern authenticated encryption mode that attaches an integrity tag while encrypting; if the ciphertext is tampered with, decryption simply fails, making it safer than encrypt-only CBC.
Is the passphrase used directly as the key?
No. The passphrase is first run through PBKDF2 with a random salt and many iterations to derive a fixed-length key, which resists rainbow tables and slows brute force on weak passphrases.
Why does the same text yield different ciphertext each time?
A fresh random IV (initialization vector) is used each time. This is a security feature preventing attackers from inferring repeated plaintext; the IV is read back alongside the ciphertext on decryption.
Can I decrypt if I forget the passphrase?
No. Without the passphrase the key cannot be derived and the ciphertext is mathematically unrecoverable. The tool stores no passphrase and has no recovery backdoor, so remember it.
Is this the same as Base64 encoding?
Not at all. Base64 is reversible encoding anyone can decode and offers no secrecy; encryption needs a key to reverse. If you only want encoding, use our Base64 tool.
Any browser compatibility requirements?
This tool works in all modern browsers (Chrome, Firefox, Edge, Safari). No plugins or extensions required.
Can I use it offline?
After initial load, most features work offline. The core logic runs entirely in your browser with no network dependency.
Comments
Comments are stored locally in your browser. Configure Giscus for cloud-based comments.