Decrypt AES-256-GCM output produced by the encryption tool, verifying the authentication tag.
AES-GCM Encryption with User Key
Encrypt text with AES-256-GCM using a key derived from your passphrase, with a fresh random salt and IV.
- Free
- No sign-up
- Runs in your browser
Input
0 characters
Processed entirely in your browser. Nothing is uploaded.
At least 8 characters. The key is derived from this, so it is the weakest link.
Fill in Text to encrypt and Passphrase to continue.
Enter your input to see the result
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Enter the text and a passphrase.
- 2
Keep the whole three-part output (salt.iv.ciphertext). The salt and IV are not secret, but decryption is impossible without them.
- 3
Encrypted in your browser with the Web Crypto API. Neither the passphrase nor the text is transmitted.
Questions about AES-GCM Encryption with User Key
Why is the output different every time I encrypt the same text?
Because a fresh random salt and IV are generated per message, and that is not optional. Reusing an IV with the same key in GCM destroys both confidentiality *and* integrity - it is one of the few cryptographic mistakes that breaks everything at once.
How is the key derived?
PBKDF2-HMAC-SHA-256 with 310,000 iterations, the current OWASP recommendation for that function. Argon2id would be better, being memory-hard, but Web Crypto does not provide it and shipping a WASM build would mean a download. The high iteration count compensates as far as PBKDF2 allows.
Is this strong enough for real data?
AES-256-GCM is, and so is the derivation. Your passphrase probably is not: a short or guessable one can be attacked offline at speed, and no amount of key stretching fixes that. Use a long random passphrase from a password manager. For files and long-term storage, age or GPG with a proper key is the better tool.
Is it safe to paste a real secret here?
The computation happens in your browser and nothing is transmitted, so the secret does not leave your device. Two caveats worth knowing anyway: anything you paste may be captured by a browser extension with page access, and it may linger in your clipboard. For a production credential, a local command-line tool is still the better habit.
Does the AES-GCM Encryption with User Key work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the AES-GCM Encryption with User Key keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Generate an RSA key pair in your browser and export it as PEM, with a SHA-256 fingerprint.
Generate an Ed25519 key pair in your browser and export it as PEM, with a SHA-256 fingerprint.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.
Check that JSON is syntactically valid, report its structure, and flag duplicate keys that JSON.parse accepts silently.
Compare two JSON documents structurally, by path, distinguishing a type change from a value change.
Evaluate a JSONPath expression against a document and see every match with the path that produced it.