DevTools Logo

ELF, PE & Mach-O Header Inspector

ELF, PE & Mach-O Header Inspector

Decode executable headers, tables and security flags locally — no toolchain, no upload.

Runs in your browser
Load a sample

Binary file

Supported formats

ELF (32/64-bit, LE/BE), PE (PE32/PE32+), Mach-O and universal/fat Mach-O. Java class files that share the fat magic are rejected.

Binary Header Inspector identifies a file by its magic bytes and parses the header regions it actually needs: ELF class, endianness, machine, entry point, program and section headers, PE COFF fields and sections, Mach-O cputype and load commands, plus universal-binary slice tables. Rows link to a bounded hex peek, and security-relevant flags such as RWX segments, PIE, NX and code signatures are listed as text. Parsing is read-only, bounds-checked and entirely local — the binary is never uploaded, loaded or executed, and no disassembly is attempted.

Header regions are read as slices; the binary is never uploaded or executed.

Decoded structure

no file loaded

No binary loaded yet

Load a sample or choose a file.

Examples

ELF64 executable

Input
Sample ELF
Output
ELF64 · little-endian · EM_X86_64 · entry 0x0000000000001040

A synthetic ET_EXEC file with one RWX LOAD segment and named sections.

PE32+ console app

Input
Sample PE
Output
AMD64 · PE32+ · console · .text section

The DOS stub points at e_lfanew; the optional header magic selects PE32+ decoding.

Fat Mach-O

Input
Sample fat binary
Output
1 slice · ARM64 at offset 0x100

Pick the slice to run the Mach-O parser at the recorded offset.

About this tool

Binary Header Inspector is a readelf/objdump-lite view for three executable formats: ELF, PE and Mach-O. It detects the container from magic bytes, then parses only the header and table regions needed for the report.

For ELF files the tool decodes class, endianness, type, machine and entry point, walks program and section headers and recovers section names from the string table. For PE it decodes the DOS stub offset, COFF header, optional header and sections. For Mach-O it walks load commands, and fat binaries expose a slice picker.

Every decoded row links to a bounded hex peek. Security-relevant properties such as RWX segments, PIE, NX and code signatures are shown as textual flags — informational observations, never a malware verdict. Nothing is executed or uploaded.

What this tool does not do

  • No instruction decoding, decompilation or relocation tables.
  • Only common machine and command IDs are named; unknown IDs are shown as hex.
  • Hex peeks are capped at 256 bytes and file intake at 100 MB.
  • Truncated files produce partial tables with explicit warnings.
  • The parser is read-only and cannot validate cryptographic signatures.

How to use this tool

  1. Choose a binary

    Load one of the four samples or pick a local file with the file chooser. Files up to 100 MB are handled with header-region slices.

  2. Read the header table

    The default tab shows decoded header fields with their byte offsets. Architecture and entry point appear in the panel meta line.

  3. Inspect tables

    Open Tables for program headers, section headers, PE sections or Mach-O load commands. Clicking the first cell jumps to that offset.

  4. Check flags and bytes

    Open Security flags for RWX/PIE/NX observations, or Hex peek for a 256-byte window at any offset.

Use cases

Firmware triage

Answer class, endianness and machine questions for a firmware blob without binutils.

Binary anatomy teaching

Show students how headers, segments and sections relate to a hex view.

Cross-compile checks

Confirm that a build artifact targets the expected architecture and subsystem.

Recognized containers

FormatMagic
ELF32 / ELF64, LE / BE7f 45 4c 46
PE32 / PE32+MZ … PE signature at e_lfanew
Mach-O 32 / 64feedface, feedfacf and byte-swapped forms
Universal / fatcafebabe / bebafeca

A Java class file also starts with cafebabe; the tool checks nfat_arch plausibility and rejects it explicitly.

Common mistakes

Mistake:Expecting a disassembler.

Fix:This tool reads headers only; it never decodes instructions or decompiles code.

Mistake:Trusting a flag as a malware verdict.

Fix:RWX and NX flags are structural facts, not a security judgement.

Mistake:Assuming cafebabe always means a fat Mach-O.

Fix:The magic collides with Java class files; implausible slice counts are rejected with an explanation.

Mistake:Uploading a proprietary binary to an online service.

Fix:All bytes stay in this tab; there is no upload or network call.

Mistake:Expecting imports and relocations to be listed.

Fix:Dynamic-linking analysis is limited to presence flags in this version.

Frequently asked questions

Which formats can it read?

ELF (32- and 64-bit, little- or big-endian), PE (PE32 and PE32+), Mach-O and universal/fat Mach-O. The parser starts from magic bytes and rejects formats it cannot recognize, including Java class files that share the cafebabe magic.

Can it disassemble a binary?

No. It decodes headers, program and section headers, load commands, tables and a bounded hex window. No instructions are decoded and no decompilation is attempted.

How do I read program headers?

Open the Tables tab. Each program header shows its decoded type, R/W/X flag string and file offset, and clicking the first cell jumps the hex peek to that structure.

What does an RWX segment mean?

The segment is flagged readable, writable and executable at once. That can be intentional (for example JIT runtimes) but is often a hardening concern. It is a structural observation, not a malware verdict.

Is my binary uploaded?

No. The file is read in your browser tab with sliced DataView reads. Nothing is uploaded, stored or executed, and the file is forgotten when you clear it or leave the page.

What happens with a truncated file?

Header fields that are present are still decoded. Tables stop at the truncated entry and the report lists a warning naming the affected field or entry, so you can tell partial output from a clean parse.

References & standards