Skip to content

ODC (.odc)

.odc file signature | application/vnd.oasis.opendocument.chart

OpenDocument Chart (ODC) is a component of the OpenDocument format family, developed and maintained by OASIS. It is used to store chart documents created in office suites such as LibreOffice and Apache OpenOffice, typically for embedding graphs in spreadsheets and presentations. The format is generally safe and uses standard XML-based packaging, though like other office documents it may contain embedded content that should be reviewed when received from untrusted sources.

Safe

Magic Bytes

Offset 0
50 4B

Sources: Apache Tika

Extension

.odc

MIME Type

application/vnd.oasis.opendocument.chart

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .odc files in Python

Python
def is_odc(file_path: str) -> bool:
    """Check if file is a valid ODC by magic bytes."""
    signature = bytes([0x50, 0x4B])
    with open(file_path, "rb") as f:
        return f.read(2) == signature

How to validate .odc files in Node.js

Node.js
function isODC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x4B]);
  return buffer.subarray(0, 2).equals(signature);
}

How to validate .odc files in Go

Go
func IsODC(data []byte) bool {
    signature := []byte{0x50, 0x4B}
    if len(data) < 2 {
        return false
    }
    return bytes.Equal(data[:2], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .odc file?

A .odc file is identified by the magic bytes 50 4B at byte offset 0. OpenDocument Chart (ODC) is a component of the OpenDocument format family, developed and maintained by OASIS. It is used to store chart documents created in office suites such as LibreOffice and Apache OpenOffice, typically for embedding graphs in spreadsheets and presentations. The format is generally safe and uses standard XML-based packaging, though like other office documents it may contain embedded content that should be reviewed when received from untrusted sources.

What are the magic bytes for .odc files?

The magic bytes for ODC files are 50 4B at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .odc file?

To validate a .odc file, read the first bytes of the file and compare them against the known magic bytes (50 4B) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .odc files?

The primary MIME type for .odc files is application/vnd.oasis.opendocument.chart.

Is it safe to open .odc files?

ODC (.odc) 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.