Free · Private · Client-side
PGP Key Format Demo & GPG Setup
Learn what OpenPGP key blocks look like and how to generate real PGP keys with GPG. The demo below produces structurally-formatted example blocks — not usable keys — so you can explore the format safely.
Generated values never leave this device.These are not usable OpenPGP keys
The blocks this demo produces are structurally-formatted examples that show what armored OpenPGP output looks like. They are not valid OpenPGP packets and cannot be imported into GPG or used for email encryption. To create real keys, run gpg --full-generate-key in your terminal — see the commands below.
Generate Real PGP Keys with GPG
GPG (GNU Privacy Guard) is the standard, free OpenPGP implementation. Generate your key pair locally so the private key never leaves your machine:
Interactive key generation — choose algorithm, key size, expiration, and identity
gpg --full-generate-keyList your keys and find your key ID
gpg --list-secret-keys --keyid-format LONGExport your public key to share with others
gpg --export --armor [email protected] > public-key.ascCreate a revocation certificate and store it somewhere safe
gpg --output revocation.asc --generate-revocation YOUR_KEY_IDFormat Demo
Configure the options below to see how the choices you'd make in gpg --full-generate-key shape the armored output. Identity fields are optional — example values are used if you leave them blank.
Using Real GPG Keys
Once you've generated a real key pair with gpg --full-generate-key, these commands cover the everyday OpenPGP workflow:
1. Import Keys into GPG
If you received key files (for example from a backup or another machine), import them into your GPG keyring:
gpg --import public-key.ascgpg --import private-key.ascgpg --list-secret-keys --keyid-format LONG2. Encrypt a Message
Encrypt a message for someone using their public key:
echo 'Secret message' | gpg --encrypt --armor --recipient [email protected]gpg --encrypt --armor --recipient [email protected] message.txtThe encrypted output can be safely sent via email or any insecure channel.
3. Decrypt a Message
Decrypt messages sent to you:
gpg --decrypt encrypted-message.ascecho '-----BEGIN PGP MESSAGE-----...' | gpg --decrypt4. Sign a Message
Create a digital signature to verify message authenticity:
gpg --clearsign message.txtecho 'Important message' | gpg --clearsigngpg --detach-sign --armor document.pdf5. Verify Signatures
Verify the authenticity of signed messages:
gpg --verify signed-message.ascgpg --verify document.pdf.asc document.pdf6. Export and Share Keys
Share your public key with others:
gpg --export --armor [email protected] > public-key.ascgpg --send-keys --keyserver keyserver.ubuntu.com YOUR_KEY_IDgpg --search-keys [email protected]Email Client Integration Examples
Thunderbird Setup
- Install Thunderbird and set up your email account
- Go to Tools → Account Settings → End-to-End Encryption
- Click "Add Key" → "Import a personal key from file"
- Select your private key file and enter passphrase
- Enable "Digital signing" and "Require encryption" as needed
Mailvelope (Web)
- Install Mailvelope browser extension
- Open Mailvelope Options → Key Management
- Click "Import Keys" and paste your private key
- Add your email accounts to Mailvelope
- Compose encrypted emails directly in your webmail
Apple Mail (macOS)
- Import your key into GPG Suite for macOS
- Open Apple Mail preferences
- Go to Accounts → Select account → Advanced
- Enable "Encrypt outgoing mail" and "Sign outgoing mail"
- Mail will automatically use your PGP key
Outlook with Gpg4win
- Install Gpg4win (includes Kleopatra key manager)
- Import your key using Kleopatra
- Install GpgOL plugin for Outlook integration
- Restart Outlook and look for encryption options
- Use encrypt/sign buttons when composing emails
Real-World Use Cases & Examples
Business Communication
Secure client communications and confidential documents:
gpg --encrypt --armor --recipient [email protected] contract-v2.pdfgpg --clearsign --local-user [email protected] press-release.txtSoftware Development
Sign git commits and release packages:
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign truegpg --detach-sign --armor myapp-v1.2.3.tar.gzHealthcare & Legal
HIPAA-compliant communication and legal document verification:
gpg --cipher-algo AES256 --encrypt --recipient [email protected] patient-file.pdfgpg --clearsign --local-user [email protected] legal-brief.txtPersonal Privacy
Secure personal communications and file backup:
tar czf - important-docs/ | gpg --symmetric --cipher-algo AES256 > backup.tar.gz.gpgecho "Family news..." | gpg --encrypt --armor --recipient [email protected]About PGP Encryption
Pretty Good Privacy (PGP) is a data encryption and decryption program that provides cryptographic privacy and authentication for data communication. PGP uses a combination of symmetric-key cryptography and public-key cryptography.
Key Features
- • End-to-end encryption for emails
- • Digital signatures for authenticity
- • Key distribution and management
- • Cross-platform compatibility
- • Open source implementations (GPG)
Use Cases
- • Secure email communication
- • File encryption and signing
- • Software distribution verification
- • Secure messaging applications
- • Document authentication
Algorithm Comparison
| Algorithm | Key Size | Performance | Security Level | Recommended For |
|---|---|---|---|---|
| RSA 2048 | 2048 bits | Fast | Good | General use, compatibility |
| RSA 4096 | 4096 bits | Slower | Excellent | Long-term security |
| ECC P-256 | 256 bits | Very Fast | Good | Mobile, IoT devices |
| ECC P-384 | 384 bits | Fast | Excellent | High security applications |
Frequently Asked Questions
Does this page generate real PGP keys?
No. The demo blocks are structurally-formatted examples that show what armored OpenPGP output looks like — they contain no usable OpenPGP key material and cannot be imported into GPG. Generate real keys locally with gpg --full-generate-key.
What is the difference between RSA and ECC keys?
RSA keys are widely supported and use larger key sizes (2048-4096 bits). ECC keys are newer, more efficient, and provide equivalent security with smaller key sizes (256-384 bits). Choose RSA for maximum compatibility, ECC for better performance.
How do I use real PGP keys once I have them?
After generating a key pair with GPG, configure your email client (Thunderbird, Apple Mail) or use browser extensions like Mailvelope for webmail. Always keep your private key secure and never share it.
Should my PGP key expire?
Yes, setting an expiration date is recommended for security. You can always extend the expiration later if needed. If you lose access to your key, expiration prevents it from being used indefinitely. Choose 1-2 years for personal use, shorter for high-security contexts.
Is it safe to generate PGP keys in a browser?
Real PGP keys should be generated offline with GPG — for high-value keys, on an air-gapped computer. That is why this page is a format demo rather than a real key generator: pasting or generating real private keys in a browser adds unnecessary risk.
What should I do with the revocation certificate?
Store your revocation certificate in a safe place separate from your private key. If your private key is ever compromised or lost, you can use the revocation certificate to notify others that the key should no longer be trusted.
Can I use PGP for file encryption, not just email?
Absolutely! PGP can encrypt any type of file or data. Use gpg --encrypt to encrypt files, documents, backups, or any sensitive data. Many backup tools and applications also support PGP encryption natively.
How to get real PGP keys
Security notice
Real PGP private keys should be generated offline with GPG — ideally on an air-gapped computer for high-value keys — and never pasted into a browser or transmitted over the network. Store your private key and revocation certificate securely: losing them means losing access to encrypted data. The demo blocks on this page contain no usable key material.