Skip to content

GNUMERIC (.gnumeric)

.gnumeric file signature | application/x-gnumeric

GNUMERIC is the native spreadsheet workbook format used by Gnumeric, an open-source spreadsheet application developed within the GNOME project. It is used to store worksheets, formulas, formatting, charts, and other spreadsheet data for personal, academic, and business analysis, and can be opened by Gnumeric and some compatible office suites. The format is generally safe, though as with any document file, untrusted files should be opened with current software to avoid parsing issues.

Safe

Magic Bytes

Offset 39
3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B

Sources: Apache Tika

Extension

.gnumeric

MIME Type

application/x-gnumeric

Byte Offset

39

Risk Level

Safe

Validation Code

How to validate .gnumeric files in Python

Python
def is_gnumeric(file_path: str) -> bool:
    """Check if file is a valid GNUMERIC by magic bytes at offset 39."""
    signature = bytes([0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B])
    with open(file_path, "rb") as f:
        f.seek(39)
        return f.read(14) == signature

How to validate .gnumeric files in Node.js

Node.js
function isGNUMERIC(buffer: Buffer): boolean {
  const signature = Buffer.from([0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B]);
  if (buffer.length < 53) return false;
  return buffer.subarray(39, 53).equals(signature);
}

How to validate .gnumeric files in Go

Go
func IsGNUMERIC(data []byte) bool {
    signature := []byte{0x3D, 0x3C, 0x67, 0x6D, 0x72, 0x3A, 0x57, 0x6F, 0x72, 0x6B, 0x62, 0x6F, 0x6F, 0x6B}
    if len(data) < 53 {
        return false
    }
    return bytes.Equal(data[39:53], signature)
}

API Endpoint

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

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .gnumeric file?

A .gnumeric file is identified by the magic bytes 3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B at byte offset 39. GNUMERIC is the native spreadsheet workbook format used by Gnumeric, an open-source spreadsheet application developed within the GNOME project. It is used to store worksheets, formulas, formatting, charts, and other spreadsheet data for personal, academic, and business analysis, and can be opened by Gnumeric and some compatible office suites. The format is generally safe, though as with any document file, untrusted files should be opened with current software to avoid parsing issues.

What are the magic bytes for .gnumeric files?

The magic bytes for GNUMERIC files are 3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B at byte offset 39. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .gnumeric file?

To validate a .gnumeric file, read the first bytes of the file and compare them against the known magic bytes (3D 3C 67 6D 72 3A 57 6F 72 6B 62 6F 6F 6B) at offset 39. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .gnumeric files?

The primary MIME type for .gnumeric files is application/x-gnumeric.

Is it safe to open .gnumeric files?

GNUMERIC (.gnumeric) 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.