Hashes/Crypto
PGP/GPG Encrypt/Decrypt
Generate PGP keys, encrypt and decrypt messages (OpenPGP, RFC 4880) via the openpgp.js library.
PGP/OpenPGP (RFC 4880) uses a key pair — public and private — for end-to-end message encryption and digital signatures. This tool generates keys and encrypts/decrypts messages using the openpgp.js library, right in your browser.
How to use it
- Generate keys: provide a name, email, and passphrase to get a public/private key pair ready to use.
- Encrypt: encrypt a message with the recipient's public key — only whoever holds the matching private key can decrypt it.
- Decrypt: paste an encrypted message along with your private key and passphrase to read the original text.
Common uses
- End-to-end encrypting sensitive correspondence when the recipient has their own PGP key.
- Verifying a digital signature on a message or file to confirm the sender's authenticity.
- Generating a test key pair to learn or set up a PGP workflow without installing GnuPG.
Things to keep in mind
A public key can be shared freely — it's exactly what others need to encrypt a message for you; a private key must never be shared with anyone.
Losing a private key with no backup means old messages can never be decrypted again — that's why creating a revocation certificate right after generating a key is worth doing immediately.
Article about this tool: PGP: how public-key and private-key encryption works
Frequently asked questions
What's the difference between encrypting and signing with PGP?
Encrypting scrambles a message so only the intended recipient's private key can read it, using their public key. Signing does the opposite — it uses your private key to prove the message came from you and wasn't altered, verifiable by anyone with your public key.
Do I need to trust this tool with my private key?
All key generation, encryption, decryption, and signing happen entirely in your browser — your private key is never sent to a server. Still, treat any private key you paste here with the same care as anywhere else.
What's the difference between RSA and ECC keys here?
RSA is the older, more widely supported option, typically requiring longer keys (2048+ bits) for equivalent security. ECC (elliptic curve) achieves similar security with much shorter keys, making it faster, though slightly less universally supported by older software.
What is the Web of Trust and how does it differ from X.509?
Unlike X.509, where trust is guaranteed by a centralized certificate authority, PGP relies on a "Web of Trust": users sign each other's public keys themselves, confirming they've personally verified who a key belongs to. Trust in an unfamiliar key arises through a chain of signatures from people you already trust.
What happens if I lose my private key?
Without your private key, you can't decrypt messages encrypted for you or sign anything in your name — the key can't be recovered without a backup. That's why creating a revocation certificate right after generating a key is an important practice.