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 encryption 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.
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
- 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.