Encrypt a message or file with someone's PGP public key, decrypt messages sent to you with your private key, and create or check signatures. Paste ASCII-armored keys from GnuPG, Kleopatra, Proton or any OpenPGP app. Everything runs in your browser with OpenPGP.js; keys and messages are never uploaded.
Last updated:
Loading OpenPGP.js…
Public key(s)
Recipient's key to encrypt, or sender's key to verify. Several keys allowed.
Your private key
Needed to decrypt and to sign. Stays on this page.
Signature type
Verify a detached signature
Put the original text (or file) above and the signature block here.
Result
Advertisement
Advertisement
How to use the PGP Encrypt / Decrypt
Paste the public key of the person you are writing to (or the sender, to verify a signature). You can paste several keys.
Paste your private key and its passphrase if you want to decrypt or sign. It stays on this page and is never uploaded.
Pick a tab: Encrypt, Decrypt, Sign or Verify, and paste or type the message (or open a file).
Press the action button. The result appears below with a signature check where relevant.
Copy or download the result. No keys yet? Press Use a test key pair, or create real keys with the PGP Key Generator.
Which key does what?
Task
Key needed
Whose key
Result
Encrypt
Public key
The recipient's
-----BEGIN PGP MESSAGE----- that only the recipient can open
Decrypt
Private key + passphrase
Yours
The original text or file
Sign
Private key + passphrase
Yours
A signed message or detached signature
Verify
Public key
The signer's
Valid / invalid, and who signed
Encrypt-and-sign combines both: the message is signed with your private key first and then encrypted to the recipient's public key, so they can check it came from you. When you decrypt such a message here, paste the sender's public key too and the signature is verified automatically.
How PGP encryption works
OpenPGP (RFC 4880) uses hybrid encryption. A random one-time session key encrypts the message with a fast symmetric cipher (AES-256 by default in OpenPGP.js), and that session key is then encrypted to each recipient's public key with RSA or elliptic-curve Diffie-Hellman (X25519, NIST P-curves). The message also carries an integrity check (MDC), so any tampering makes decryption fail. Adding several recipients only adds one small encrypted session key per recipient.
Password-based messages work the same way, except the session key is derived from your password with an iterated, salted S2K function. Anyone with the password can decrypt, so share it over a different channel than the message.
Same operations in GnuPG
# encrypt (and sign) for a recipient, ASCII-armored
gpg --armor --encrypt --sign --recipient [email protected] message.txt
# decrypt and verify
gpg --decrypt message.txt.asc
# cleartext signature and verification
gpg --clearsign message.txt
gpg --verify message.txt.asc
# detached signature for a file
gpg --armor --detach-sign report.pdf
gpg --verify report.pdf.asc report.pdf
# password (symmetric) encryption
gpg --armor --symmetric message.txt
Frequently asked questions
Which key do I use to encrypt and which to decrypt?
Encrypt with the recipient's public key; only their private key can decrypt the result. To read a message someone sent you, decrypt it with your own private key and passphrase. Signing works the other way around: you sign with your private key and others verify with your public key.
Is it safe to paste my private key into a website?
This page runs the open-source OpenPGP.js library locally: your keys, passphrase and messages are processed in your browser's memory and never sent to a server or stored. Still, only paste private keys into tools you trust, and for long-term secrets prefer local software such as GnuPG. A test key pair button is provided for trying the tool safely.
Can I read a message I encrypted myself?
Only if you encrypted it to your own key too. Tick 'Also encrypt to my own key' in the Encrypt tab when your private key is filled in, and you will be able to decrypt the message later.
Why does it say the message was not encrypted for my key?
The message was encrypted to a different public key, for example an old key of yours or another recipient's. Check the key IDs: the recipient key ID inside the message must match one of your key's subkeys. Messages encrypted with a password instead of a key need the password field.
What is the difference between a cleartext and a detached signature?
A cleartext signature keeps the message readable and wraps it between BEGIN PGP SIGNED MESSAGE and a signature block, which is handy for email and forums. A detached signature is a separate block, used to sign files or text that must stay unchanged; to verify, you need both the original text and the signature.
Is this compatible with GnuPG?
Yes. OpenPGP.js implements RFC 4880, so messages encrypted here decrypt with gpg --decrypt, and messages from gpg --armor --encrypt or Kleopatra decrypt here. Binary .gpg files can be opened in the Decrypt tab.
Is there a size limit?
Text and files up to about 25 MB work well; everything happens in your browser's memory, so very large files are better handled with GnuPG on your computer.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.