Paint

application/octet-stream

Safe

Magic Bytes

Offset: 0
50 45 53 54

The PDN format is the native image file type for Paint.NET, a graphics editor created by Rick Brewster and maintained by dotPDN LLC. It serves as the primary project format for preserving multi-layered image data, blending modes, and transparency levels that standard raster formats cannot support. Although considered safe for general use, the complexity of the format requires that users exercise caution when opening files downloaded from untrusted internet locations.

Extension

.pdn

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .pdn files in Python

Python
def is_pdn(file_path: str) -> bool:
    """Check if file is a valid PDN by magic bytes."""
    signature = bytes([0x50, 0x45, 0x53, 0x54])
    with open(file_path, "rb") as f:
        return f.read(4) == signature

How to validate .pdn files in Node.js

Node.js
function isPDN(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x45, 0x53, 0x54]);
  return buffer.subarray(0, 4).equals(signature);
}
Go
func IsPDN(data []byte) bool {
    signature := []byte{0x50, 0x45, 0x53, 0x54}
    if len(data) < 4 {
        return false
    }
    return bytes.Equal(data[:4], signature)
}

API Endpoint

GET /api/v1/pdn
curl https://filesignature.org/api/v1/pdn

Related Formats