PGP decrypt and encrypt
Runs in your browserDecrypt a PGP message with your private key, encrypt for someone’s public key, sign and verify. When something fails, it tells you why. Nothing you paste leaves your browser.
Check the signature too
Paste a PGP message on the left
With the private key and its passphrase, it is decrypted right here. Signatures are checked too.
What happens, step by step
The same with GnuPGin your terminal
Sign it too
Type a message and paste a public key
Only the owner of the matching private key, or whoever knows the password, can read the result.
What happens, step by step
The same with GnuPGin your terminal
Type a text and paste your private key
Anyone with your public key can then check that it comes from you and wasn’t changed.
What happens, step by step
The same with GnuPGin your terminal
Signature in a separate file
Paste a signed text on the left
You see who signed it, when, and whether anything changed since.
What happens, step by step
The same with GnuPGin your terminal
Start from an example
The examples use two demo keys made with GnuPG: Alice (Curve25519, passphrase alice) and Bob (RSA 3072, passphrase bob). Each one fills in the message, the keys and the passphrase.
Decrypt
Encrypt
Sign and verify
Common mistakes
How PGP encryption works
PGP doesn’t encrypt your text with the recipient’s key directly. It makes a random session key, encrypts the text with it (usually AES-256) and then locks the session key with the recipient’s public key. Only the matching private key unlocks it again. A signature is made with the sender’s private key and checked with their public key.
Bob sends Alice a message
Alice opens it
The demo message from the examples, decrypted with Alice’s private key while this page was built:
Why decryption fails, and what GnuPG says
The tool names the reason in plain words. Here is what the same problem looks like in GnuPG 2.4.4, so you recognize it in the terminal too.
| GnuPG says | What it means | What helps |
|---|---|---|
gpg: decryption failed: No secret key | The message was encrypted for a key you don’t have, or your private key isn’t imported. | Compare the key ID in “encrypted with … key, ID …” with yours. Ask the sender to encrypt again for your current key. |
gpg: public key decryption failed: Bad passphrase | The passphrase doesn’t unlock your private key. | It is case-sensitive. Check the keyboard layout and a space at the end. |
gpg: no valid OpenPGP data found. | GnuPG doesn’t see a PGP block: quote marks from an email reply, a missing -----BEGIN line, or something else entirely. | Paste it here: quote marks, indentation and joined lines are repaired automatically. |
gpg: CRC error; 57DA61 - 000000 | The checksum line (=XXXX) doesn’t match: characters changed on the way. | Ask for the message as a file attachment instead of pasted text. |
gpg: [don't know]: invalid packet (ctb=0d) | A line is missing or was changed, so the data inside is broken. | Copy the whole block again, from -----BEGIN to -----END. |
gpg: decryption failed: Bad session key | A message encrypted with a password (gpg -c) and the password is wrong. | Passwords are case-sensitive. Ask the sender. |
gpg: WARNING: encrypted message has been manipulated! | The integrity check failed: the encrypted data was changed after encryption. | Don’t trust the content. Ask the sender to send it again. |
gpg: BAD signature from "Bob <bob@example.org>" | The text or file is not exactly what was signed. Often only line endings changed (Windows vs. Unix). | Paste the text here: the tool tells you if only line endings or a final line break differ. |
gpg: Can't check signature: No public key | You don’t have the signer’s public key. | Get the key from the signer and compare its fingerprint, then check again. |
gpg: … skipped: Unusable public key | The recipient’s key is expired or revoked, or it has no encryption subkey. | Ask the owner to extend it (gpg --quick-set-expire) or for their new key. The key viewer shows which part is the problem. |
The same with GnuPG
Every tab shows the matching command under “The same with GnuPG”. The basics:
| Task | Command |
|---|---|
| Decrypt a message | gpg --decrypt message.asc |
| Decrypt a file | gpg --output report.pdf --decrypt report.pdf.gpg |
| Encrypt for someone | gpg --armor --encrypt --recipient alice@example.org message.txt |
| Encrypt and sign | gpg --armor --sign --encrypt --recipient alice@example.org message.txt |
| Encrypt with a password | gpg --armor --symmetric message.txt |
| Clear-sign a text | gpg --clearsign message.txt |
| Detached signature | gpg --armor --detach-sign file.zip |
| Verify | gpg --verify message.txt.ascgpg --verify file.zip.asc file.zip |
| Import a key | gpg --import alice.asc |
| Show what a message is encrypted for | gpg --list-packets message.asc |
All commands on this page were run in GnuPG 2.4.4 as part of the tests below.
Tested against GnuPG
The tool runs on OpenPGP.js, the library behind Proton Mail and Mailvelope. Around it sit the parts that make it useful: repairing pasted blocks, finding out which key a message needs, and explaining what went wrong. All of it was checked against a real GnuPG 2.4.4 on 1 December 2026:
- GnuPG → this tool. 745 automated checks, run on every change, built on what GnuPG made: 9 key types (Curve25519, RSA 2048 and 4096, NIST P-256/384/521, Brainpool, DSA/ElGamal), 39 messages (armored and binary, signed, several recipients, hidden recipients, files), 27 signatures and 12 password messages with different ciphers. Fingerprints, key IDs, dates and capabilities match
gpg --with-colons; every error message on this page was triggered in GnuPG. - This tool → GnuPG: 198 of 198 checks. Everything it encrypts, signs or generates, GnuPG decrypts, verifies and imports, including changed passphrases and revocation certificates. Another 62 checks run the pages in Chrome and hand the results to GnuPG.
- GnuPG 2.4’s own format. Messages from GnuPG 2.4 to GnuPG 2.4 keys use its AEAD mode (OCB). Many online tools fail there; this one decrypts them.
- What it can’t do. Ed448 keys from GnuPG 2.4 (a version 5 key format outside the OpenPGP standard), and messages encrypted with Camellia or IDEA. It says so instead of guessing.
Questions about PGP decryption and encryption
Is it safe to paste my private key here?
The tool runs entirely in your browser: there is no server that receives your input, and the page’s Content-Security-Policy blocks connections to other sites (check it in your browser’s developer tools). Still, a private key is the most sensitive thing you own. For long-term keys, the safest place is your own computer with GnuPG; the commands are on this page.
Can a PGP message be decrypted without the private key?
No. Without the private key of a recipient, or the password if it was encrypted with one, nobody can read it. Any site that claims otherwise is not telling the truth.
What’s the difference between PGP, GPG and OpenPGP?
OpenPGP is the open standard (RFC 9580). PGP was the original program. GPG, short for GnuPG, is the free implementation most people use, also behind Kleopatra and GPG Suite. Messages and keys from all of them work here.
Why does it say the message wasn’t encrypted for my key?
Every message lists the key IDs it was encrypted for. If none of them is a key you have the private part of, you can’t open it, even if the name matches: the sender may have an old key of yours. The tool shows the IDs on both sides.
Which files can I open?
Armored text (.asc) and binary files (.gpg, .pgp, .sig). Decrypted files keep their original name and can be downloaded. Everything stays in your browser’s memory, so very large files depend on your device.
Does it work with Kleopatra, Thunderbird or Proton Mail?
Yes. They all use OpenPGP. Keys exported from Kleopatra (Export or Backup Secret Keys), Thunderbird’s OpenPGP Key Manager or Proton Mail can be pasted here, and messages encrypted here open there.