Decrypt text or files locally with our AES-256-GCM Encryptor — the password, salt, and nonce stay in your browser.
What you need before decrypting
To decrypt AES-256-GCM ciphertext you need three things: the password (or key), the salt used during key derivation, and the nonce (IV) used during encryption.
The salt and nonce do not need to be secret. Store them next to the ciphertext—for example, as separate fields in a file header or as companion files. Only the password has to stay secret.
If you encrypted the file with our AES-256-GCM encryptor, the salt and nonce are shown with the result so you can save them alongside the file. See our /en/blog/aes-256-gcm-decryption-guide for the encryption side.
If any of the three is missing or mismatched, decryption fails. That is by design: GCM authenticates the data and refuses to release plaintext that does not verify.
How the key is derived
Most browser-based tools, including ours, derive the AES-256 key from your password with PBKDF2 (HMAC-SHA256, 100,000 iterations) and the stored salt. Iteration counts are not comparable across tools: OWASP's current guidance for PBKDF2-HMAC-SHA256 is 600,000 iterations, while this site's AES tools ship with 100,000 — a deliberate trade of some resistance to offline guessing for a delay a browser can tolerate.
You must use the same KDF parameters that produced the key. If the tool that encrypted the file used a different iteration count or hash, the derived key will differ and the authentication tag will fail.
Step-by-step decryption
1. Open the decryption tool and select the file or paste the ciphertext (Base64 or hex).
2. Provide the salt and nonce if they are not embedded in the file header.
3. Enter the password used during encryption. The key is derived locally with PBKDF2.
4. Run decryption. GCM verifies the authentication tag first; only valid ciphertext is released as plaintext.
The whole process runs in your browser. No file, password, or key is sent to a server—you can verify this in the Network tab of the developer tools.
Decrypting with the Web Crypto API
The same steps work in your own application. Derive the key with PBKDF2, then call subtle.decrypt with the exact nonce:
AES-256-GCM decryption in JavaScript
async function decryptData(ciphertext, password, salt, iv) { const encoder = new TextEncoder(); const keyMaterial = await crypto.subtle.importKey( 'raw', encoder.encode(password), 'PBKDF2', false, ['deriveKey'] ); const key = await crypto.subtle.deriveKey( { name: 'PBKDF2', salt, iterations: 100000, hash: 'SHA-256' }, keyMaterial, { name: 'AES-GCM', length: 256 }, false, ['decrypt'] ); const plaintext = await crypto.subtle.decrypt( { name: 'AES-GCM', iv, tagLength: 128 }, key, ciphertext ); return new TextDecoder().decode(plaintext);}Common decryption errors and fixes
- Authentication tag verification failed – wrong password, wrong salt, or corrupted ciphertext. Check the inputs byte-for-byte.
- Wrong IV/nonce – GCM requires the exact nonce used at encryption time. A wrong nonce produces garbage or an authentication failure.
- Base64/hex mistakes – padding, line breaks, or URL-safe variants change the bytes. Normalize the encoding before decrypting.
- Encoding mismatch – the plaintext was UTF-8 text but you decoded the bytes as something else. Use TextDecoder('utf-8') for text output.
Security tips
- Never reuse a nonce with the same key—GCM becomes insecure after roughly 2^32 encryptions under one key.
- Keep passwords long and unique; the derived key is only as strong as the password.
- Back up the salt and nonce with the ciphertext; losing them makes decryption impossible even with the correct password.
Frequently Asked Questions
Q.What if I forgot the encryption password?
A.Without the password the data cannot be decrypted—there is no backdoor or recovery mechanism. Try every password you might have used, but plan for loss: keep passwords in a password manager and store salt/nonce with the ciphertext.
Q.Can I decrypt data encrypted by OpenSSL or other tools?
A.Yes, if you match the format. OpenSSL's enc -aes-256-gcm stores the salt and IV in its own header and expects the tag; our tools read standard Base64/hex ciphertext with separate salt and nonce fields. Match the parameters and encoding, and any AES-256-GCM implementation can interoperate.
Q.Is browser-based decryption secure?
A.Yes when implemented correctly. The Web Crypto API uses native, audited implementations, and your password and plaintext never leave the device. Verify by opening the Network tab in developer tools during decryption—no requests are made.
Q.Is there a file size limit?
A.Decryption is limited by browser memory—files up to a few hundred MB work fine. For multi-GB files, use a command-line tool such as OpenSSL or GPG.
References
For new work, AES-256-GCM is the safer default because it authenticates the ciphertext in the same operation. If you want the full walkthrough of the second option, read our AES-GCM vs ChaCha20-Poly1305 comparison.
- NIST SP 800-38D – Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM): https://csrc.nist.gov/pubs/sp/800/38/d/final
- RFC 5116 – An Interface and Algorithms for Authenticated Encryption: https://www.rfc-editor.org/rfc/rfc5116
- W3C Web Cryptography API: https://www.w3.org/TR/WebCryptoAPI/
Decrypt your data locally
Decrypt text or files with AES-256-GCM in your browser — no upload, no account.
Conclusion
AES-256-GCM decryption fails loudly on any mismatch—wrong password, salt, nonce, or corrupted bytes. Keep the metadata with the ciphertext, use a strong unique password, and decrypt locally with tools you can verify.
Related Articles
bcrypt vs Argon2: Password Hashing
bcrypt has protected passwords for decades; Argon2 is the modern, memory-hard recommendation. Here is how they compare and when to use each in 2026.
QR Code Printing: Size, Contrast, Materials
A QR code that fails to scan on paper is a broken link. Get the minimum size, contrast, error correction, and quiet-zone rules right before sending the file to print.
Developer Security Tools: Zero-Knowledge Guide
The tools you reach for with sensitive data should not see that data. A guide to the zero-knowledge security toolbox: what each tool does, when to use it, and how to verify it.
Encrypt .env Files Before Commit
Committing a plaintext .env leaks every secret in your repository. If a copy must live in git, encrypt it first - here is the safe workflow.
Verify Downloaded ISO Checksums: Linux, Windows, and macOS
A corrupted ISO can fail hours into an install. Verify the SHA-256 checksum before you burn or write it, and never upload the file to do it.
AES-GCM vs ChaCha20-Poly1305
Both encrypt and authenticate in one pass. AES-GCM wins on hardware-accelerated chips; ChaCha20-Poly1305 wins in pure software and on small devices. The rest of the decision is your platform.