Skip to content

Windows application log (.lgc)

.lgc file signature | application/octet-stream

Windows application log (LGC) is a log file format developed and maintained by Microsoft for recording application events and related system activity in Windows environments. It is used by operating system components and installed applications for troubleshooting, auditing, and reviewing runtime behavior or errors. The format is generally safe, but logs may contain sensitive paths, usernames, or event details, so access should be restricted when sharing or analyzing files from untrusted sources.

Safe

Magic Bytes

Offset 0
7B 0D 0A 6F 20

Sources: Gary Kessler

Extension

.lgc

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .lgc files in Python

Python
def is_lgc(file_path: str) -> bool:
    """Check if file is a valid LGC by magic bytes."""
    signature = bytes([0x7B, 0x0D, 0x0A, 0x6F, 0x20])
    with open(file_path, "rb") as f:
        return f.read(5) == signature

How to validate .lgc files in Node.js

Node.js
function isLGC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x7B, 0x0D, 0x0A, 0x6F, 0x20]);
  return buffer.subarray(0, 5).equals(signature);
}

How to validate .lgc files in Go

Go
func IsLGC(data []byte) bool {
    signature := []byte{0x7B, 0x0D, 0x0A, 0x6F, 0x20}
    if len(data) < 5 {
        return false
    }
    return bytes.Equal(data[:5], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .lgc file?

A .lgc file is a Windows application log file. Windows application log (LGC) is a log file format developed and maintained by Microsoft for recording application events and related system activity in Windows environments. It is used by operating system components and installed applications for troubleshooting, auditing, and reviewing runtime behavior or errors. The format is generally safe, but logs may contain sensitive paths, usernames, or event details, so access should be restricted when sharing or analyzing files from untrusted sources.

What are the magic bytes for .lgc files?

The magic bytes for Windows application log files are 7B 0D 0A 6F 20 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .lgc file?

To validate a .lgc file, read the first bytes of the file and compare them against the known magic bytes (7B 0D 0A 6F 20) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .lgc files?

There is no officially registered MIME type for .lgc files. Systems typically use application/octet-stream as a generic fallback when handling this format.

Is it safe to open .lgc files?

Windows application log (.lgc) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.