Simple, static, vanilla JavaScript web app for encrypting text with PGP in the browser.
Everything runs entirely client-side using OpenPGP.js loaded from a CDN.
You can try the latest version here:
- Single text area, dual mode:
- Type or paste plaintext and click Encrypt.
- Paste an armored PGP message (starting with
-----BEGIN PGP …) and the button switches to Decrypt.
- Key selection:
- Default public key loaded from a local
default-public-key.ascfile (gitignored). - User-selected public key file (
.asc/.pgp/.gpg/.txt).
- Default public key loaded from a local
- Private key decryption:
- Select an ASCII‑armored private key file and (optionally) its passphrase.
- Decrypts PGP messages entirely in the browser.
- Passphrase convenience (optional):
- Checkbox to save the private key passphrase in the browser’s local storage.
- Never sent to any server.
- Keypair generation (optional):
- Collapsible panel to generate a new RSA‑4096 keypair in the browser using OpenPGP.js.
- Downloads separate
*-public.ascand*-private.ascfiles.
- One-click copy: Copy whatever is currently in the text area (encrypted or decrypted text) to the clipboard.
- Client-side only: All crypto and key handling happen locally in your browser; nothing is transmitted to a backend.
From the project root:
docker compose up --build -dThen open:
http://localhost:8989
To have a default recipient key available without selecting a file each time:
-
Create a file named
default-public-key.ascin the project root (next toindex.html). -
Paste your ASCII-armored PGP public key into that file:
-----BEGIN PGP PUBLIC KEY BLOCK----- ... -----END PGP PUBLIC KEY BLOCK----- -
This file is listed in
.gitignore, so it will not be committed to the repo.
At runtime, the app will:
- Load
default-public-key.ascautomatically, and - Use it whenever Key source is set to “Use default public key”.
The app can also decrypt messages using your PGP private key:
- In the “Private key (for decryption)” section:
- Select your ASCII-armored private key file (e.g.
private.asc). - Enter the passphrase for that key if it is encrypted (leave blank if not).
- Select your ASCII-armored private key file (e.g.
- Paste an ASCII-armored PGP message into the “Encrypted output” textarea.
- Click Decrypt.
- The decrypted plaintext will appear in the “Text to encrypt / decrypted output” textarea.