How to Decrypt a GPG or PGP File Online
To decrypt a GPG or PGP file online, open a browser tool that accepts .gpg, .pgp, or .asc files, then unlock the file with the matching private key and passphrase, or with the password if it was encrypted symmetrically. The plaintext is rebuilt on your device. This guide explains how file decryption differs from a text message, walks through the steps, and covers the errors people hit most often.
What is the difference between a PGP file and a PGP message?
A PGP message is usually a block of ASCII-armored text that starts with -----BEGIN PGP MESSAGE-----. You can paste that block into a form, send it in email, or copy it from a chat window. A PGP or GPG file is a document, photo, archive, or other binary payload that has been encrypted (and sometimes signed) as a file. It often has a .gpg, .pgp, or .asc extension, and you open it with a file tool rather than a message form.
The cryptography is the same OpenPGP format. GnuPG, Kleopatra, Thunderbird, and browser tools that implement OpenPGP can read each other's output when the packet is intact. What changes is the container: a message is text you paste; a file is an attachment or download you select from disk.
If someone sent you a block of text with BEGIN and END lines, use the PGP decrypt page (or the Decrypt tab on the homepage). If they sent a .gpg or .pgp attachment, use the PGP file encryption tool. Mixing the two forms is a common reason decryption appears to fail. For a full walkthrough of text messages, see How to Encrypt and Decrypt a Message with PGP.
Some mail clients wrap a small encrypted file as ASCII armor with a .asc name. That file is still a file: import it in the file tool, or open it as text only if it is clearly a BEGIN PGP MESSAGE block and not a binary transfer.
How do I decrypt a .gpg, .pgp, or .asc file online?
You can decrypt a GPG or PGP file in the browser without installing GnuPG, as long as you have the secret that unlocks it and the file was not truncated in transit.
1. Save the attachment to disk. Keep the original filename if you can, and do not open it in a word processor or image editor first. Those apps can alter bytes and make the ciphertext unreadable.
2. Open the file decryption tool. Choose the option to decrypt a file, then select the .gpg, .pgp, or .asc file from your device.
3. If the file was encrypted to a public key, import the matching private key and type its passphrase. If the sender used a shared password (symmetric encryption), enter that password instead. The tool will tell you which secret it needs once it reads the file headers.
4. Start decryption. The recovered file is built in your browser and offered as a download. Check that the output name and type match what you expected (a PDF should open as a PDF, not as more ciphertext).
5. When you are finished, clear the private key and passphrase from the form, and close the tab if you used a shared computer. OnlinePGP runs the cryptography locally with OpenPGP.js; keys and file contents are not uploaded to the server. For a closer look at that model, read Is Online PGP Safe?.
To encrypt a file the other way, use the same tool: choose a recipient public key or a password, select the original file, and download the encrypted result. You can also encrypt a text message (not a binary file) on the PGP encryption tool page.
Do I need a private key or a password?
It depends on how the file was encrypted. OpenPGP supports two common modes, and the decrypting side must use the same mode the sender chose.
Public-key encryption (the usual case when you already exchange PGP keys) locks the file to one or more public keys. Only the matching private key can open it. The passphrase you type is not a second copy of the file password; it unlocks your private key so the tool can use it. If you have the right key file but the wrong passphrase, decryption still fails. If you want a deeper explanation of this split, see Why You Need Your Private Key to Decrypt a PGP Message. The same rule applies to files.
Symmetric encryption locks the file to a shared password or passphrase, with no key pair involved. Anyone who has that password can decrypt the file. This is convenient for a one-off transfer, but you must send the password on a different channel than the file, and you cannot later prove who created the ciphertext from the password alone.
A file can also be both encrypted and signed. Signature checking is separate from decryption: after the file opens, you may still want to verify the PGP signature online with the sender's public key, and confirm the fingerprint out of band. A valid signature proves the matching private key was used; it does not, by itself, prove you should trust that key.
Why did file decryption fail?
When a .gpg or .pgp file will not decrypt, work through these checks before you assume the tool is broken.
1. Confirm you have the private key that matches the public key the sender used, not a different key pair and not the public key itself. If the sender encrypted to an older or revoked key, the key you use every day will not open the file.
2. Recheck the passphrase or the symmetric password. A single typo or Caps Lock will fail, and there is no reset. If you use a password manager, paste the value instead of retyping it.
3. Make sure the file was not truncated or re-encoded. Email systems sometimes wrap attachments, convert them to a different encoding, or prepend a disclaimer. Re-download the original attachment if you can. Do not rename a random download to .gpg and expect it to decrypt.
4. If you pasted a text block into a file tool, or dropped a binary file into the message decrypt form, switch to the matching tool. ASCII armor must keep its BEGIN and END lines intact; a binary .gpg file should be selected from disk, not pasted as text.
5. Algorithm or version mismatches are less common but real. A file produced with a newer OpenPGP feature may not open in an older desktop client, and the reverse can also happen. If the browser tool fails, try a current GnuPG install as a second check, or ask the sender which software and key they used.
More general pitfalls, including sending the wrong key and damaged armor, are covered in Common PGP Mistakes.
Can I decrypt a GPG file with PGP tools?
Yes, in the usual cases. GPG is the GnuPG implementation of the OpenPGP standard. PGP was the original product name. A file created with GnuPG encrypt is typically an OpenPGP file, and a browser tool that speaks OpenPGP can decrypt it when you supply the right private key or password. Ciphertext produced in the browser can usually be decrypted later with GnuPG, Kleopatra, or a mail client that supports OpenPGP.
The names on the file are not a guarantee of the format. Some programs use .pgp for older PGP output, .gpg for GnuPG, and .asc for ASCII armor, but those extensions are conventions. Always let the tool read the file. If you want the terminology spelled out, read PGP vs GPG vs OpenPGP.
Compatibility still has limits. If the sender used a cipher, AEAD mode, or key version that your tool does not implement yet, decryption will fail even with the correct secret. In that situation, decrypt on the same software the sender used, or agree on a widely supported profile (a current OpenPGP key and a standard cipher) before you exchange sensitive files.
When should I use GnuPG instead of the browser?
A browser tool is a good fit when you need to open a single file quickly, you do not want to install desktop software, and you understand that the private key will be used in that browser session. It is also useful on a machine where you cannot install GnuPG.
Prefer GnuPG, Kleopatra, Gpg4win, or a mail client with an OpenPGP add-on when you decrypt files often, when the files are very large, or when your threat model says a private key should never be pasted into a web page. Desktop tools can keep keys in a local keyring, use a pinentry prompt, and integrate with hardware tokens.
For very sensitive work, generate and store keys on a machine you control, verify software downloads, and treat any browser tab that has held a private key as a session you close when the task is done. The browser path is convenient; it is not a replacement for a carefully maintained keyring.
If you do not have a key pair yet and you want to receive encrypted files, generate a PGP key first, share only the public key, and keep the private key offline or in a protected store. Then ask the sender to encrypt to that public key.
Frequently Asked Questions
Can I decrypt a .gpg file in my browser?
Yes, if the file is a standard OpenPGP ciphertext and you have the matching private key and passphrase, or the shared password for a symmetrically encrypted file. Use the PGP file encryption tool and select the file from disk rather than pasting it as text.
Is a .pgp file the same as a .gpg file?
Often yes. Both extensions are commonly used for OpenPGP-encrypted files. The extension is a hint, not a guarantee. Let the decryption tool read the file, and confirm with the sender which software and key they used if the file will not open.
Why does my PGP file decrypt on one computer but not in the browser?
The browser tool may be missing the private key that sits in your desktop keyring, the file may have been damaged when you copied it, or the sender may have used an option your browser library does not support. Export the correct private key, re-download the original file, and try again. If it still fails, decrypt with the same desktop software that can already open it.
Can I decrypt a PGP file without a private key?
Only if the file was encrypted with a shared password rather than a public key. If it was encrypted to a public key, the matching private key is required. There is no backdoor or recovery code on this site.
Decrypt a file or a message now
Use the file tool for .gpg, .pgp, and .asc attachments, or the PGP decrypt page if you have an ASCII-armored text block.