.GPG

GPG File

GnuPG Encrypted File
Ask a question
QUICK ANSWER

A .gpg file is binary data produced by GnuPG (GNU Privacy Guard), the free OpenPGP encryption tool. Most .gpg files are encrypted - to read one you need GnuPG plus the right passphrase or private key, then run "gpg file.gpg" to decrypt. Renaming the file does nothing; the contents are ciphertext until decrypted.

Developer: GnuPG (Free Software Foundation / g10 Code); OpenPGP standard (IETF) Category: Encrypted Files Open standard MIME: application/pgp-encrypted
OPENS ON Windows macOS Linux
Related: .ASC · .SIG · .DEC · .ENC

On this page

19k+ extensions indexed
Last reviewed Aug 23, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the GPG file format?

The .gpg file format is used for files created with GNU Privacy Guard (GnuPG), a widely used open-source encryption tool. A .gpg file most commonly contains an encrypted file or message, though the same extension also covers binary keyrings and detached signatures within the same OpenPGP ecosystem.

Data stored in .gpg files follows the OpenPGP standard - originally defined by RFC 2440 (1998) and revised as RFC 4880 in 2007. This is the same standard used by the .pgp format (Pretty Good Privacy), making .gpg and .pgp largely interchangeable at the data level. The standard received a significant update as RFC 9580 (2024), introducing mandatory AEAD encryption and support for modern elliptic curves such as Ed448 and X448. To decrypt a .gpg file you need GnuPG and the recipient's matching private key; binary keyrings are stored in .kbx files.

A .gpg file is binary - it is not human-readable. The ASCII-armored text equivalent, which can be safely shared by email or pasted into a terminal, uses the .asc extension instead. On Windows, Gpg4win with its Kleopatra graphical interface is the most common way to work with .gpg files; on Linux and macOS, the gpg command-line tool handles encryption, decryption, and key management.

Security & safety

RISK: LOW

The .gpg format is a security tool, not a threat - the file is encrypted/signed OpenPGP data and contains no executable code. The real cautions are about keys and secrets: a secring.gpg / secret-key .gpg holds your PRIVATE keys - never share it, and protect it with a strong passphrase. When decrypting, do it locally with GnuPG, not on a website where you'd paste a passphrase or private key. For an encrypted file you received, a successful decrypt only means it decrypted - the plaintext inside should still be treated with normal caution. After decrypting, the recovered file (e.g. an exe or document) carries whatever risk that file type normally would.

Format details

in a nutshell
FULL NAMEGnuPG Encrypted File
DEVELOPERGnuPG (Free Software Foundation / g10 Code); OpenPGP standard (IETF)since GnuPG 1.0 in 1999; OpenPGP standardized as RFC 2440 (1998) / RFC 4880 (2007) / RFC 9580 (2024)
MIME TYPEapplication/pgp-encrypted
TYPEBinary OpenPGP data - most often an encrypted file/message; the same OpenPGP ecosystem also stores binary signatures and keyrings under .gpg
STANDARDOpen · royalty-free

Programs that open GPG files

Windows1 app
Gpg4win (Kleopatra) Open-source Right-click the .gpg > More GpgEX options > Decrypt and verify (or run 'gpg -d file.gpg' in a terminal). Enter the passphrase or unlock the private key.
macOS2 apps
GnuPG (gpg) Open-source Install via Homebrew ('brew install gnupg'), then 'gpg -d file.gpg > output' to decrypt.
GPG Suite Free GUI for GnuPG (GPG Keychain + Finder Services); decrypt/verify .gpg files from Finder.
Linux2 apps
GnuPG (gpg) Open-source Pre-installed on most distros: 'gpg file.gpg' (or 'gpg -d file.gpg') decrypts; 'gpg --import key.gpg' imports keys.
Seahorse (GNOME Passwords and Keys) Open-source GUI key manager; with Nautilus integration you can decrypt/verify .gpg files from the file manager.

Technical details

deep spec
MIME typeapplication/pgp-encrypted
File encodingBinary OpenPGP packets (not Base64; see .asc for the ASCII-armored text variant)
Primary purposeEncrypting files and messages; also used for binary keyrings and detached signatures
Governing standardOpenPGP - RFC 2440 (1998), RFC 4880 (2007), RFC 9580 (2024)
Packet structureSeries of variable-length OpenPGP packets; first byte is a packet-tag byte with the high bit always set
Magic bytesNone fixed - first byte is an OpenPGP packet tag; commonly 0x85, 0x84, or 0xC1 for encrypted-data packets
Asymmetric algorithmsRSA, ElGamal, ECDH, ECDSA, EdDSA (Ed25519; Ed448 added in RFC 9580)
Symmetric ciphersAES-128/192/256, Camellia-128/192/256, 3DES, Twofish (selected via algorithm preference in the recipient's key)
Hash algorithmsSHA-256, SHA-512 (preferred); SHA-1 (legacy); SHA3-256, SHA3-512 (RFC 9580)
Pre-encryption compressionOptional - plaintext may be compressed with DEFLATE (ZIP), ZLIB, or BZIP2 before encrypting
Symmetric-only modeSupports passphrase-based encryption without a public key using S2K (string-to-key) derivation
Integrity protectionMDC (Modification Detection Code) in RFC 4880; AEAD modes (OCB, EAX, GCM) mandated in RFC 9580
Decryption requirementRecipient's private key (or passphrase for symmetric-only files) and GnuPG or a compatible OpenPGP tool
Key infrastructureCompatible with Web of Trust (WoT) model and public keyservers such as keys.openpgp.org
ReleasedGnuPG 1.0 in 1999; OpenPGP standardized as RFC 2440 (1998) / RFC 4880 (2007) / RFC 9580 (2024)
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

GPG conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with GPG files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about GPG files.

Frequently asked questions

How do I open / decrypt a .gpg file?
Install GnuPG (it's built into most Linux distros; on Windows use Gpg4win, on macOS use GPG Suite or Homebrew), then run 'gpg file.gpg' (or 'gpg -d file.gpg'). You'll need the passphrase, or the private key the file was encrypted to. There's no way to read it without decrypting.
I renamed the .gpg and it's just gibberish - why?
Because it's encrypted, not merely re-extensioned. The contents are ciphertext until you decrypt them with GnuPG and the right passphrase or private key. Renaming changes nothing.
What's the difference between .gpg and .asc?
Same OpenPGP data, different encoding: .gpg is binary, .asc is ASCII-armored text (Base64 you can paste into email). Convert with 'gpg --armor' / 'gpg --dearmor'. Both decrypt/verify the same way.
What are pubring.gpg, secring.gpg and trustdb.gpg?
They're GnuPG keyring files in your ~/.gnupg folder: pubring.gpg holds public keys, the legacy secring.gpg held secret keys (GnuPG 2.1+ replaced it with a key store and pubring.kbx), and trustdb.gpg is the trust database. They're managed by GnuPG, not opened by hand.
How do I encrypt a file as .gpg?
To a recipient: 'gpg --encrypt --recipient [email protected] file' makes file.gpg only they can open. With a passphrase only: 'gpg --symmetric file'. Add '--armor' if you want the .asc text form instead.
Can I decrypt a .gpg without the password?
No. Without the passphrase (for symmetric encryption) or the correct private key (for public-key encryption), the file cannot be decrypted - that's the entire point. Online 'gpg decryptors' that don't have your key are scams.

References

1RFC 9580 - OpenPGP (current standard)www.rfc-editor.org
2GnuPG - official site & documentationgnupg.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.EXEWindows Executable (Portable Executable)
4.PARTPartial Download File
5.DATProgram Data File (generic)
6.BINCD/DVD Disc Image (BIN/CUE)
7.RPMSGRestricted Permission Message
8.MDMarkdown Document
9.TXTPlain Text File
10.TMPTemporary File

Related extensions

.ASCOpenPGP ASCII-Armored File
.SIGOpenPGP Detached Signature
.DECEncrypted / Encoded data file (generic)
.ENCEncrypted / Encoded file (generic)
.KDBXKeePass 2 Password Database
.PGPPGP Encrypted File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z