# PGP / GPG Armored Decoder

> Remove the ASCII armor from a PGP key or message and inspect the packets inside.

- Page: https://decoder.tools/pgp-decoder
- Category: Security, PKI & Crypto
- Status: live, runs in the browser
- Last reviewed: 2026-10-23

A PGP armor decoder strips the `-----BEGIN PGP …-----` wrapper from a key, signature or message and lists the OpenPGP packets inside, such as key packets, user IDs, signatures and encrypted session keys.

## Example

A public key block decodes to its packets, user ID and key details:

```text
Public Key: v4, EdDSA, created 2026-10-23
User ID: Ada Lovelace <ada@example.com>
Signature: v4 signature
```

For an encrypted message, the Public-Key Encrypted Session Key packets reveal which key IDs it was encrypted to.

## ASCII armor and packets

OpenPGP (RFC 9580, which replaced RFC 4880) data is binary and made of **packets**. To paste it into email or a web page it is **ASCII-armored**: Base64 with a header line, optional `Key: value` headers, and a CRC-24 checksum line starting with `=`.

| Armor header | Contents |
|---|---|
| `BEGIN PGP PUBLIC KEY BLOCK` | Public key, user IDs and self-signatures |
| `BEGIN PGP PRIVATE KEY BLOCK` | Secret key, usually passphrase-protected |
| `BEGIN PGP MESSAGE` | Encrypted and/or signed message |
| `BEGIN PGP SIGNATURE` | Detached signature |
| `BEGIN PGP SIGNED MESSAGE` | Clear-signed text followed by a signature |

Common packets: public-key (tag 6), user ID (tag 13), signature (tag 2), public-key encrypted session key (tag 1) and encrypted data (tags 18 and 20).

## How to use the PGP decoder

1. Paste a `-----BEGIN PGP …-----` block, or open a `.asc` / `.gpg` file.
2. Read the packet list: public-key and subkey packets, user IDs, signatures and (for messages) the recipient key IDs.
3. The armor's CRC-24 checksum is verified, so you'll know if the block was damaged in copy-paste.

`gpg --list-packets` shows the same packets on the command line:

```sh Command line
# Show the packets in a key or message
gpg --list-packets key.asc

# Show key IDs, user IDs and algorithms without importing
gpg --show-keys key.asc
```

## At a glance

| | |
|---|---|
| Specification | RFC 9580 (OpenPGP), formerly RFC 4880 |
| Armor | Base64 plus a CRC-24 checksum |
| Key ID | Last 8 bytes of the fingerprint |
| Modern algorithms | Ed25519 / Cv25519 (ECC), RSA 3072+ |

## FAQ

### Can I see who a message is encrypted to?

Usually yes. Each recipient gets a public-key encrypted session key packet containing their key ID, unless the sender hid it with `--throw-keyids`.

### Is it safe to share a PGP public key?

Yes. Public keys are meant to be published. Never share a `PRIVATE KEY BLOCK`.

### What is the line starting with = at the end?

It's the CRC-24 checksum of the armored data, which detects copy-paste damage. It has nothing to do with the signature.
