About the AES-GCM Encrypt & Decrypt Tool
AES-GCM Encrypt & Decrypt Tool protects a piece of text with a password using your browser’s built-in Web Crypto API. When you encrypt, the tool creates a new random 16-byte salt and a new random 96-bit IV with crypto.getRandomValues(), derives a 256-bit AES key from your password with PBKDF2-HMAC-SHA-256 and 600,000 iterations, and encrypts the UTF-8 text with AES-GCM. Because the salt and IV are new every time, encrypting the same text with the same password twice gives completely different output.
The result is a versioned JSON envelope containing only what is needed to decrypt: the version, algorithm, KDF, hash, iteration count, salt, IV and ciphertext, with binary values in Base64. The password is never included or stored. AES-GCM is authenticated encryption, so decryption either returns the exact original text or fails: a wrong password or any change to the envelope is reported as an authentication failure, and no partial text is ever shown. Forgotten passwords cannot be recovered.
How to use
- Choose Encrypt text, type or paste your text and enter a password twice.
- Click Encrypt and wait a moment while the key is derived.
- Copy or download the encrypted JSON envelope and keep your password safe.
- To decrypt, choose Decrypt JSON, paste the envelope and enter the password.
- Click Decrypt, then copy or download the plaintext. Use Reset to clear everything.
Key features
- AES-256-GCM authenticated encryption via the Web Crypto API.
- PBKDF2-HMAC-SHA-256 key derivation with 600,000 iterations.
- Fresh random salt and 96-bit IV for every encryption.
- Self-contained, versioned JSON envelope with Base64 values.
- Clear errors for malformed JSON, unsupported envelopes, wrong passwords and altered data.
- Copy and download for both the encrypted JSON and the decrypted text, plus full Reset.
Best practices
- Use a long, unique password — several random words or 12+ random characters.
- Store the password separately from the encrypted JSON, for example in a password manager.
- Share the envelope and the password through different channels.
- Test decryption once before deleting the original text.
- Only use the tool on a device and browser you trust.
Benefits
- Encrypt notes or secrets without installing software.
- Standard, well-reviewed algorithms from the browser itself.
- Tamper detection built into every decryption.
- Nothing leaves your device.
Frequently asked questions
Can I recover the text if I forget the password?
No. The password is never stored or sent anywhere, and the envelope does not contain it. Without the correct password the text cannot be decrypted.
Why does decryption say authentication failed?
AES-GCM checks an authentication tag before releasing any text. If the password is wrong or any part of the envelope was changed, the check fails and nothing is shown. The tool cannot tell which of the two happened.
Why is the output different each time I encrypt the same text?
Each encryption uses a new random salt and IV, so the derived key and ciphertext are different every time. This is intended and prevents patterns from leaking.
Is it safe to share the JSON envelope?
The envelope contains no secrets — the salt and IV are designed to be public — but its safety depends on your password. Anyone who learns or guesses the password can decrypt it.
Why does encrypting take a moment?
PBKDF2 with 600,000 iterations deliberately slows down key derivation, which makes guessing passwords much more expensive for an attacker.
Can it encrypt files?
No. This tool encrypts text only. It also does not store passwords or keys.
Does it protect me if my device is compromised?
No. Malware, a malicious browser extension or someone watching your screen can capture text and passwords before encryption. A browser tool cannot protect a compromised device.