ToolSphere

AES Encryption & Decryption

More tools

Encrypt and decrypt text with AES-256-GCM and a passphrase (PBKDF2 key derivation), entirely in your browser. The text and key never leave your device.

AES-GCM encryption / decryption

Encrypt messages with PBKDF2 key derivation and 256-bit AES-GCM blocks securely inside the browser sandbox.

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

About AES Encryption & Decryption

AES-GCM and Why Password-Based Encryption Needs PBKDF2

AES-GCM (Galois/Counter Mode) is a modern, authenticated encryption mode — it doesn't just encrypt data, it also generates a tag that detects whether the ciphertext was tampered with, which older AES modes (like plain CBC) don't provide on their own. This authentication matters because encryption without integrity checking can be vulnerable to certain tampering attacks that modify ciphertext in predictable ways.

A passphrase typed by a human isn't a valid AES key on its own — AES needs a fixed-length key of specific bit strength (256 bits here), and a short, memorable passphrase has far less entropy than that. PBKDF2 (Password-Based Key Derivation Function 2) bridges this gap by repeatedly hashing the passphrase (with a random salt) many thousands of times, which serves two purposes: it stretches the passphrase into a proper fixed-length key, and it deliberately slows down brute-force attacks against the passphrase itself, similar to how bcrypt/Argon2 protect stored passwords (see Password Hashing) for the same underlying reason.

All of this happens using the browser's native WebCrypto API — a well-audited, standard cryptographic implementation rather than a hand-rolled one, which matters a great deal for anything claiming to provide real security.

Guides and tutorials

Frequently asked questions

Why does AES-GCM matter more than plain AES encryption?

GCM adds authentication on top of encryption — it can detect if ciphertext has been tampered with, not just keep the content confidential, which plain unauthenticated modes don't provide.

Why can't a passphrase be used directly as an AES key?

AES requires a fixed-length key of specific bit strength; a human-memorable passphrase has far less entropy and the wrong format — PBKDF2 derives a proper key from it while also slowing down brute-force guessing.

Why does PBKDF2 deliberately run slowly?

Speed helps an attacker guessing passphrases, not the legitimate user — PBKDF2's repeated hashing rounds are an intentional cost that makes brute-forcing the passphrase computationally expensive, the same principle bcrypt and Argon2 use for password storage.

Have a suggestion for AES Encryption & Decryption?Share your feedback ↗