PGP decrypt and encrypt

Runs in your browser

Decrypt 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
Waiting for a message

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
Examples

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 it works

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

Bob’s textHi Alice, …
Session keyRandom AES-256 keyMade fresh for this message. The content is encrypted with it.
Signed by BobBobbob@example.orgThe signature goes inside, so only the recipients see who signed.
Locked forAlice (Curve25519)alice@example.orgThe session key is locked with this key, so only its owner can unlock it.
The resultPGP message (ASCII armor)Safe to paste into an email or chat.

Alice opens it

The demo message from the examples, decrypted with Alice’s private key while this page was built:

The messageEncrypted for 1 keykey A057BA954A17E594.
Your private keyAlicealice@example.orgSubkey A057BA954A17E594 (Curve25519 (ECDH)) matches. The passphrase unlocks it.
Session keyAES-256One random key for this message only, unwrapped with Curve25519 key agreement.
The contentAES-256 OCB (GnuPG AEAD)Integrity checked: nothing was changed on the way.
SignatureBobbob@example.orgValid signature by Bob <bob@example.org>, made 2026-12-01 21:55 UTC.
The text101 charactersUnpacked (ZLIB).
Public key locks, private key opensGive your public key to anyone. Keep the private key and its passphrase to yourself.
One message, several readersFor each recipient, the same session key is locked once more. That’s why you can read what you sent, if you add yourself.
Signed is not encryptedA clear-signed text can be read by anyone. The signature only proves who wrote it and that it wasn’t changed.
When it fails

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 saysWhat it meansWhat helps
gpg: decryption failed: No secret keyThe 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 passphraseThe 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 - 000000The 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 keyA 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 keyYou 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 keyThe 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.
Command line

The same with GnuPG

Every tab shows the matching command under “The same with GnuPG”. The basics:

TaskCommand
Decrypt a messagegpg --decrypt message.asc
Decrypt a filegpg --output report.pdf --decrypt report.pdf.gpg
Encrypt for someonegpg --armor --encrypt --recipient alice@example.org message.txt
Encrypt and signgpg --armor --sign --encrypt --recipient alice@example.org message.txt
Encrypt with a passwordgpg --armor --symmetric message.txt
Clear-sign a textgpg --clearsign message.txt
Detached signaturegpg --armor --detach-sign file.zip
Verifygpg --verify message.txt.asc
gpg --verify file.zip.asc file.zip
Import a keygpg --import alice.asc
Show what a message is encrypted forgpg --list-packets message.asc

All commands on this page were run in GnuPG 2.4.4 as part of the tests below.

Under the hood

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

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.

Searches the list of pages on this site. What you type stays in your browser.