b2KIT

PGP Encryption Tool

Encrypt and decrypt messages using PGP public/private keys with OpenPGP.js, fully client-side.

Tested tool guide Tested browser tools Checked August 16, 2026

What PGP Encryption Tool does and how it behaves

PGP pairs a public key, which anyone can use to encrypt a message to you, with a private key that only you hold and that alone can decrypt it. This tool does both directions in the page: paste the recipient's public key with your plaintext to get an armored PGP MESSAGE block, or paste a ciphertext block with your private key and passphrase to recover the plaintext. Everything runs client-side with OpenPGP.js, so your keys never leave the browser. The common surprise: decryption uses a different key than encryption, and a message encrypted to your key cannot be opened by anyone else.

How the result is produced

1

Encrypting

The tool parses the recipient's public key from an armored block, generates a fresh random session key, encrypts the message with that session key, encrypts the session key to the recipient's public key, and assembles the results into an armored PGP MESSAGE block with a base64 CRC24 checksum line at the end. Because the session key is random, encrypting the same text twice yields different ciphertext every time.

2

Decrypting

The message's leading packets record the key ID of the intended recipient. The tool matches that ID against the private key you pasted, uses it to unwrap the session key, decrypts the message, and checks the modification-detection code that catches tampering. If the pasted key is not the real recipient, or the passphrase is wrong, decryption fails with an error instead of showing garbage.

Good uses

  • Sending a confidential message to someone whose public key you already have: encrypt with their public key, and only their private key can ever open it.
  • Opening a PGP-encrypted message that arrived by email or chat: paste the ciphertext, your private key, and its passphrase to recover the plaintext.
  • Testing a fresh key pair: encrypt a message to your own public key, then decrypt it with your private key, to confirm the pair works before trusting it with real traffic.

Limits and checks

  • Same message, different ciphertext: the random session key means re-encrypting the same text never matches, so you cannot verify by comparing outputs. Decrypt your own output instead, or confirm the recipient key ID inside the armor.
  • Encryption hides content, not audience: the armored output discloses the recipient key ID to anyone who sees the message. If the recipient identity must stay secret, PGP encryption alone does not provide that.
  • Client-side crypto cannot rescue a lost key: if you delete the private key or forget its passphrase, no one, this tool included, can decrypt the message. There is no recovery path.

Common questions

I encrypted to a key, then cannot decrypt the result myself. What went wrong?

Likely you encrypted to someone else's public key and then tried to decrypt with your own key: a message can only be decrypted by the private key that matches the public key it was encrypted to. To test, encrypt to your own public key first. Also check the passphrase: a key created with one requires it on every decrypt.

Is it safe to paste my private key into a browser page?

The tool is designed to run entirely in the browser with OpenPGP.js, so by its design no key material is uploaded anywhere. That still leaves you trusting the page itself: load it over HTTPS on a device you control, and clear the private key from the inputs and your clipboard when you are done. For highly sensitive keys, consider a dedicated key program instead.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools