dBASE IV data file

application/octet-stream

Safe

Magic Bytes

Offset: 0
04 00 00 00 20 03 00 00

The dBASE IV data file is a legacy relational database format originally developed by Ashton-Tate for structured information storage and management. It functions as a primary container for tables, records, and field definitions within early desktop database applications and compatible legacy spreadsheet programs. Although now obsolete in modern production environments, the format remains readable by specialized data recovery tools and presents minimal security risks because it does not support executable macros.

Extension

.db4

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .db4 files in Python

Python
def is_db4(file_path: str) -> bool:
    """Check if file is a valid DB4 by magic bytes."""
    signature = bytes([0x04, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .db4 files in Node.js

Node.js
function isDB4(buffer: Buffer): boolean {
  const signature = Buffer.from([0x04, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00]);
  return buffer.subarray(0, 8).equals(signature);
}
Go
func IsDB4(data []byte) bool {
    signature := []byte{0x04, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

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

Related Formats