AES Text Encryption & Decryption
AES-256-GCM with a PBKDF2 passphrase. Free, and runs entirely in your browser — nothing you enter is uploaded, stored or sent to a server.
About Text Encryption
This is real encryption, not encoding. Your passphrase is stretched into a 256-bit key with PBKDF2-SHA-256 over 250,000 iterations and a fresh 16-byte random salt, then the text is encrypted with AES-256-GCM under a 12-byte random IV. GCM is authenticated, so tampering with the ciphertext makes decryption fail rather than return garbage.
The output carries everything needed to decrypt except the passphrase, in whichever of two shapes suits where it is going. The Base64 string glues salt, IV and ciphertext into one piece: nothing to lose, and it survives being pasted into a note or a ticket. The JSON structure writes the same bytes out named — salt, IV, ciphertext, the GCM tag on its own, and the PBKDF2 hash and iteration count — which is the form to hand another language, because every argument its library will ask for is written down instead of having to be counted out by offset.
Decryption does not ask which shape it is being given. A payload starting with a brace is read as JSON and anything else as the Base64 string, so a block goes back in the box it came out of without anybody having to remember. Encrypting the same text twice gives different output, because the salt and IV are new each time; that is correct behaviour, not a bug.
Where it helps
- AES-256-GCM with authenticated encryption: modified ciphertext is rejected, not silently mis-decrypted.
- 250,000 PBKDF2 iterations and a random salt make brute-forcing a passphrase expensive.
- Encryption and decryption both run locally, so plaintext and passphrase never leave the browser.
- Self-contained output — one Base64 blob you can paste into a note, an email or a ticket.
- A JSON form that names every parameter another implementation needs, and is read back without having to be identified.
Limits
- Lose the passphrase and the text is gone; there is no recovery path by design.
- Security is capped by passphrase strength — PBKDF2 slows an attacker down, it does not rescue
hunter2. - It protects data at rest, not the channel: whoever you send the ciphertext to also needs the passphrase, through some other route.
- The scheme is specific to this tool: the JSON form names what another implementation needs, but nothing reads it without being written to.
Frequently asked questions
Why does encrypting the same text twice give different output?
A new random salt and IV are generated every time. Identical output would leak the fact that two messages are the same.
Can I decrypt this with OpenSSL?
Only by reproducing the scheme: split the Base64 into 16-byte salt, 12-byte IV and ciphertext, derive the key with PBKDF2-SHA-256 at 250,000 iterations, then decrypt with AES-256-GCM. Encrypting as JSON instead saves the counting — every one of those numbers is written into the payload, and the 16-byte GCM tag is already split off the ciphertext, which is the shape Node, Go and Python want it in.
Do I have to say which format I am pasting in to decrypt?
No. The payload is identified by what it starts with, so both shapes go into the same box and the option only appears when encrypting. Editing the iteration count or hash in a JSON payload is honoured too — it is derived the way the payload says, not the way the tool would have written it.
What happens if I get the passphrase wrong?
Decryption fails outright. GCM verifies the authentication tag, so a wrong key cannot produce plausible-looking plaintext.
Is this suitable for sharing secrets with a colleague?
For a one-off, yes, provided the passphrase travels by a different channel than the ciphertext. For routine sharing, use a password manager with sharing built in.
Related tools
- Password Generator — Strong random passwords with an entropy estimate
- Hash Generator — SHA-2, SHA-3, BLAKE and legacy digests, in any encoding
- HMAC Generator — Keyed message authentication codes
- Base64 — Encode or decode UTF-8 text and URL-safe Base64
- MD5 Generator — MD5 digests, with a plain account of what they are still good for
- Key Derivation — Stretch a passphrase into key material with PBKDF2, scrypt or Argon2id
More Security & Cryptography tools
- Hash Generator — SHA-2, SHA-3, BLAKE and legacy digests, in any encoding
- MD5 Generator — MD5 digests, with a plain account of what they are still good for
- HMAC Generator — Keyed message authentication codes
- Key Derivation — Stretch a passphrase into key material with PBKDF2, scrypt or Argon2id
- Password Generator — Strong random passwords with an entropy estimate
- Password Strength — Judge a password by what an attacker would actually try
- JWK Generator — A JSON Web Key for a JOSE algorithm, with its key set and thumbprint id
- Key Pair Generator — RSA and elliptic-curve key pairs, generated in this tab and never sent
- TOTP / HOTP Generator — Two-factor codes, the QR code to enrol with, and why one did not match
- Bcrypt Generator — Hash a password with bcrypt, verify one against a hash, or read what a hash is made of