How to Import a PGP Key — Complete Guide
Importing a PGP key allows you to encrypt messages to someone (using their public key) or to decrypt messages sent to you (using your private key). Here's how to import PGP keys in Kleopatra, GPG, and Kleopatra.app's browser tool.
Importing in Kleopatra.app (Browser) — The easiest method. Navigate to 'Import Public Key' or 'Create/Import Private Key' in the app. Either paste the armored key text (the block starting with `-----BEGIN PGP PUBLIC KEY BLOCK-----`) or upload the .asc file. Click Import. The key is stored in your browser's localStorage — no server involved.
Importing in Kleopatra Desktop (Windows/Gpg4win) — Open Kleopatra. Go to File > Import. Select your .asc or .pgp file, or paste the armored text. The key will appear in your key list. For private keys, you may be prompted to set a local passphrase.
Importing with GPG (Command Line) — Run `gpg --import publickey.asc` for public keys, or `gpg --import privatekey.asc` for private keys. Verify the import with `gpg --list-keys` or `gpg --list-secret-keys`.
Finding someone's public key — Public keys can be shared via email, messaging apps, key servers (keys.openpgp.org), or directly. Ask your contact to export their public key as an .asc file and send it to you.
Key fingerprint verification — After importing a key, verify the fingerprint matches what the key owner told you (via a phone call or in-person). This protects against man-in-the-middle attacks where someone substitutes a different key.
Your privacy is guaranteed by design
All cryptographic operations in Kleopatra run entirely in your browser. Nothing you type, encrypt, decrypt, or generate is ever sent to our servers. There are no server logs, no analytics on your keys, and no accounts required. The code is open-source — you can verify every claim yourself.
Frequently Asked Questions
How do I import a PGP public key in Kleopatra?
In Kleopatra.app: click 'Import Public Key,' paste the armored key or upload the .asc file, and click Import. In Kleopatra desktop (Gpg4win): File > Import.
What file format is a PGP key?
PGP keys are commonly saved as .asc files (ASCII-armored) or .pgp files (binary). The armored format starts with '-----BEGIN PGP PUBLIC KEY BLOCK-----'.
Can I import a private key from GPG into Kleopatra?
Yes. Export from GPG with `gpg --export-secret-keys --armor > privatekey.asc`, then import the .asc file into Kleopatra.
Why should I verify the key fingerprint after importing?
Fingerprint verification ensures you have the real key from the intended person — not a fake key created by a third party pretending to be them.