Skip to content

Detect a file type from its header

Rebuild bytes from hex and identify the format by its signature.

Install in Serialize

What it can do

  • Reconstruct header bytes
  • Match known magic signatures
  • Report likely MIME and extension information

How the recipe works

From Hex

Convert the displayed bytes into a binary value.

Detect File Type

Compare the leading bytes with known file signatures.

Demonstration

Sample input

89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

Expected result

PNG

When to use it

  • File triage
  • Forensics labs
  • Checking mislabeled downloads

Adapt it

A signature identifies a likely container; parse or extract the file further before trusting its contents.

Source and verification

Adapted from University Politehnica of Bucharest: introductory security lab. The explanation and sample are written for Serialize, use synthetic or documentation-safe data, and are checked against the current operation catalogue. The workflow runs locally without an external API call.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close