Skip to content

Visio/DisplayWrite 4 text file

application/octet-stream

Safe

Magic Bytes

Offset: 0
50 00 00 00 20 00 00 00

Visio/DisplayWrite 4 text file is a legacy word processing format developed by International Business Machines (IBM) for use in DOS-based personal and mainframe computing environments. It was primarily utilized for drafting, formatting, and archiving business documents during the era of text-based word processing software prior to the widespread adoption of graphical editors. As an obsolete format, it poses minimal security risks, though accessing content now requires specific legacy conversion utilities or vintage software emulators.

Extension

.dw4

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .dw4 files in Python

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

How to validate .dw4 files in Node.js

Node.js
function isDW4(buffer: Buffer): boolean {
  const signature = Buffer.from([0x50, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00]);
  return buffer.subarray(0, 8).equals(signature);
}

How to validate .dw4 files in Go

Go
func IsDW4(data []byte) bool {
    signature := []byte{0x50, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

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

Related Formats

Frequently Asked Questions

What is a .dw4 file?

A .dw4 file is a Visio/DisplayWrite 4 text file file. Visio/DisplayWrite 4 text file is a legacy word processing format developed by International Business Machines (IBM) for use in DOS-based personal and mainframe computing environments. It was primarily utilized for drafting, formatting, and archiving business documents during the era of text-based word processing software prior to the widespread adoption of graphical editors. As an obsolete format, it poses minimal security risks, though accessing content now requires specific legacy conversion utilities or vintage software emulators.

What are the magic bytes for .dw4 files?

The magic bytes for Visio/DisplayWrite 4 text file files are 50 00 00 00 20 00 00 00 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .dw4 file?

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

What is the MIME type for .dw4 files?

The primary MIME type for .dw4 files is application/octet-stream.

Is it safe to open .dw4 files?

Visio/DisplayWrite 4 text file (.dw4) 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.