Runs 100% in your browser — nothing is uploaded
Crypto, Hashing & Security

AES Encrypt / Decrypt

Encrypt and decrypt text with AES-256-GCM using browser-native Web Crypto and PBKDF2 key derivation.

AES Encrypt / Decrypt
Client-side

About this tool

The AES Encrypt / Decrypt tool provides authenticated symmetric encryption entirely in your browser using the Web Crypto API's AES-GCM implementation — the same primitive used by TLS. Enter any text and a passphrase, and the tool derives a 256-bit key via PBKDF2 (SHA-256, 100,000 iterations) from your passphrase and a fresh random 16-byte salt, then encrypts with a fresh random 12-byte IV using AES-256-GCM, which provides both confidentiality and integrity.

The output is a single self-contained Base64 string: salt + IV + ciphertext concatenated together. This means decryption only needs the same passphrase — no need to separately track or transmit the salt and IV. Every encryption operation generates a new random salt and IV, so encrypting the same plaintext twice with the same passphrase produces a completely different ciphertext each time, which is correct GCM behavior.

This tool is built for developers who need to quickly encrypt a config value, a test fixture, or a small secret without spinning up a script, and for anyone who wants to see how PBKDF2 + AES-GCM key derivation and authenticated encryption work end to end. It is explicitly not a replacement for a proper secrets manager or vault.

Everything runs client-side via SubtleCrypto. Open your Network panel during use and you will see zero outbound requests.

FAQ

What encryption algorithm does this tool use?
AES-256-GCM (Galois/Counter Mode), a symmetric authenticated encryption cipher providing both confidentiality and integrity — any tampering with the ciphertext is detected and decryption fails cleanly.
How is the encryption key derived from my passphrase?
Via PBKDF2 with SHA-256 and 100,000 iterations, combined with a random 16-byte salt generated fresh for every encryption, deliberately slowing down brute-force passphrase guessing.
Why does encrypting the same text twice produce different output?
A new random salt and IV are generated for every encryption operation, which is required for GCM security. The salt and IV are embedded in the output so decryption still works with just the passphrase.
Is this safe to use for production secrets?
No. This tool is intended for learning, prototyping, and convenience. For production secrets, use a dedicated secrets manager or vault with proper access controls and auditing.
What happens if I enter the wrong passphrase when decrypting?
Decryption fails cleanly with an error rather than returning corrupted plaintext — a property of authenticated encryption, since the authentication tag check fails when the derived key is wrong.