ASC File Documentation


Summary

An ASC file is plain ASCII text, readable in any text editor. The extension is a generic label for text data, but in most modern cases a .asc is more specific: an OpenPGP ASCII-armored block — a digital signature, a public key, or an encrypted message from PGP/GnuPG, wrapped in Base64 so it survives email. Open it in a text editor and read the first line: -----BEGIN PGP…----- tells you it is OpenPGP data and which kind. Its MIME type is text/plain.

Technical details

FeatureValue
Full nameASCII text file (commonly an OpenPGP ASCII-armored block)
File extension.asc
MIME typetext/plain; PGP variants use application/pgp-signature, application/pgp-keys, application/pgp-encrypted
Format typePlain text; the OpenPGP variant is Base64 (radix-64) armor
CategoryText / encrypted files
DeveloperNone (generic text); OpenPGP armor from PGP / GnuPG (IETF standard)
IntroducedASCII dates to 1963; OpenPGP armor since PGP, 1991
EncodingASCII / UTF-8; armor body is Base64 printable text
Magic numberNone (it is text). OpenPGP armor always starts with the line -----BEGIN PGP…-----
Open standardYes — OpenPGP is RFC 4880 (2007), updated by RFC 9580 (2024)
Integrity checkOpenPGP armor carries a =-prefixed CRC-24 checksum line
Binary counterpart.gpg — the same OpenPGP data, un-armored
Also used byCAD/GIS ASCII exports (XYZ point lists, ESRI ASCII grids)
Related extensions.txt, .gpg, .sig, .pgp, .key
SpecificationRFC 9580 — OpenPGP (ASCII armor)
Structure at a glance

An .asc is plain text with no binary signature. If it is an OpenPGP-armored file it is instantly recognisable by its structure: a header line naming the block type — -----BEGIN PGP SIGNATURE-----, -----BEGIN PGP PUBLIC KEY BLOCK----- or -----BEGIN PGP MESSAGE----- — optional Version: / Comment: lines, a blank line, then line-wrapped Base64 (radix-64) data, a single =-prefixed CRC-24 checksum line, and a matching -----END PGP…----- footer. A generic ASCII .asc has none of that and is just readable text. Open the file and read line one to tell which you have.

What is an ASC file?

At its simplest, an ASC file is plain ASCII text: the .asc extension is short for “ASCII” and historically meant nothing more than a readable text file, openable in any editor. ASCII itself, the American Standard Code for Information Interchange, was standardised in 1963 and encodes letters, digits and punctuation in 7 bits. A generic .asc is just characters, the same as a TXT file with a different label, and some CAD and GIS tools still use it for plain-text data exports such as XYZ coordinate lists or ESRI ASCII-grid rasters.

In practice, though, most .asc files you meet today are something more specific: an OpenPGP ASCII-armored block. PGP and GnuPG produce binary cryptographic data, and “armoring” wraps that binary in printable text so it survives email, web forms and copy-paste without corruption. The file is still technically ASCII text — you can open it in Notepad and read it — but the readable characters are Base64-encoded key, signature or ciphertext, not prose. The two meanings share one triage step: open the file and look at the first line.

The OpenPGP armor structure

ASCII armor is defined by the OpenPGP standard, RFC 4880 (2007), updated by RFC 9580 in 2024. An armored block has a fixed five-part shape, and every part is human-inspectable.

-----BEGIN PGP SIGNATURE-----      ← armor header line (names the block type)
Version: GnuPG v2                  ← optional armor headers
Comment: https://example.org

iQEzBAABCAAdFiEE...                ← Base64 (radix-64) body, line-wrapped
...RnU9Q2h4a2Zk
=nR3F                              ← '=' + 4-char CRC-24 checksum
-----END PGP SIGNATURE-----        ← matching armor footer

The header line names what the block is: PGP SIGNATURE, PGP PUBLIC KEY BLOCK, PGP PRIVATE KEY BLOCK, or PGP MESSAGE (an encrypted message or file). Optional armor headers such as Version: and Comment: may follow, then a blank line separates them from the body. The body is the underlying binary OpenPGP packets encoded in Base64 (the spec calls it radix-64) and wrapped to fixed-width lines. The line that begins with = is a CRC-24 checksum of the pre-encoded data, guarding against corruption in transit. The block closes with a footer that must match the header exactly.

Signature, public key, or encrypted message

Three OpenPGP scenarios cover almost every .asc, and the header line tells you which you are holding.

Header lineWhat it isWhat you do with it
-----BEGIN PGP SIGNATURE-----A detached signature over a separate fileVerify the file’s authenticity against it
-----BEGIN PGP PUBLIC KEY BLOCK-----Someone’s public keyImport it to encrypt to them or verify their signatures
-----BEGIN PGP MESSAGE-----An encrypted message or fileDecrypt it with your matching private key

The most common by far is the detached signature. Open-source projects distribute one alongside a download — installer.exe plus installer.exe.asc — so you can prove the file was not tampered with before you trust it. Linux ISOs, the Tor Browser and countless software releases ship this way. A public-key .asc is a key you import into your keyring; an encrypted-message .asc can only be read by whoever holds the matching private key, by design.

Verifying a download with a detached signature

Verification is the highest-value thing a .asc does, and the mechanics are worth understanding. A detached signature does not contain the file; it contains a signature computed over the file’s contents using the signer’s private key. To check it, you need the signer’s public key imported first, then you point your OpenPGP tool at both the signature and the file:

gpg --import maintainer-key.asc         # add the signer's public key
gpg --verify installer.exe.asc installer.exe

gpg: Good signature from "Maintainer <maint@example.org>"

On Windows the same is done through Gpg4win and its Kleopatra front-end (drag the .asc in, or right-click → Verify); macOS uses GPG Suite, and Linux uses GnuPG directly or the Seahorse GUI. The subtle part is trust: a “Good signature” only means the file matches the key you imported. It says nothing about whether that key belongs to who you think. You must confirm the key’s fingerprint from the vendor’s official site, not from the same place you downloaded the file, or an attacker who supplied both the file and the key could pass their own tampered version.

Armored .asc versus binary .gpg

The .asc file is the ASCII-armored form of OpenPGP data; the binary form of the same data is a .gpg file. They are interchangeable in content and differ only in encoding: .asc is Base64 text that is safe to paste into an email or a web page, while .gpg is the raw binary packets, which are smaller but not paste-safe. GnuPG converts between them with gpg --armor (binary to armored) and gpg --dearmor (armored to binary). Verification and decryption work identically either way, so a signature distributed as .asc and one distributed as .sig do the same job; the extension just reflects whether it is armored or binary.

Is an ASC file safe?

An OpenPGP-armored .asc is plain text and cannot execute, so opening one to read it is safe. The security questions are about trust, not malware. When you verify a download, a “Good signature” is meaningful only if you trust the public key, so always confirm the key’s fingerprint from the vendor’s official channel rather than alongside the file. Importing a public-key .asc is harmless in itself, but trusting the wrong key lets someone be impersonated. Two hard rules protect you: never paste a private-key .asc or its passphrase into a website, and decrypt an encrypted .asc locally with GnuPG rather than through an online tool, because an online decryptor sees your plaintext and, if you supply it, your key.

Frequently asked questions

How do I tell what kind of .asc I have?

Open it in a text editor and read the first line. -----BEGIN PGP SIGNATURE----- is a detached signature, -----BEGIN PGP PUBLIC KEY BLOCK----- is a public key, and -----BEGIN PGP MESSAGE----- is an encrypted message. No BEGIN PGP line means it is just generic ASCII text.

Can I just open a .asc in Notepad?

Yes, an armored .asc is text, so it opens in Notepad or TextEdit and you can read the header. But a text editor cannot verify a signature or decrypt a message; for that you need GnuPG or Gpg4win. Renaming it to .txt shows the Base64 block, not the underlying data.

What is the difference between .asc and .gpg?

Same OpenPGP data, different encoding. .asc is ASCII-armored Base64 text that is safe to paste into email; .gpg is the binary form. Convert between them with gpg --armor and gpg --dearmor; both verify and decrypt identically.

References