# Hachoir

> Python library and tools that parse binary files field by field, including hachoir-metadata for extracting file metadata.

Source: https://osinttools.io/tools/hachoir/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** File
- **Category:** Data analysis and case notes
- **Pricing:** Free, open source
- **Footprint:** passive (does not contact the target)
- **Account required:** no
- **API:** no public API
- **Platforms:** Python CLI · Library
- **Website:** https://hachoir.readthedocs.io/
- **Source code:** https://github.com/vstinner/hachoir
- **GitHub:** vstinner/hachoir, 671 stars · Python · GPL-2.0 · last commit 2026-11-16
- **Listed:** Nov 27
- **Last verified by an editor:** Nov 27, 2026

## What it does

Hachoir is an open-source Python library that splits a binary file into a tree of fields, down to single bits, so you can browse and edit it. It ships with command-line programs built on its parsers, including hachoir-metadata to pull metadata from files, hachoir-strip to remove it, hachoir-grep to search binaries and hachoir-urwid and hachoir-wx to inspect files in text or graphical mode.

Investigators use hachoir-metadata to read metadata from many media, archive and executable formats that other tools miss, and the viewers to look inside unusual or damaged files during forensic work.

Footprint is passive: it reads its own index or third-party records and does not contact the target. No account is needed. There is no public API.

## Features

- Field-by-field binary parsing
- hachoir-metadata extractor
- hachoir-strip metadata remover
- hachoir-grep binary search
- Text and GUI file viewers
- Python library for developers

## Pros

- Free and open source
- Parses many formats, including executables and archives
- Runs offline
- Still maintained

## Cons

- Command-line and library focus
- Output is technical
- Format coverage varies by parser

## When to use it

- Use it when you need metadata from a file format that common metadata viewers do not read.
- Use it when you want to inspect the internal structure of a binary file.

## Quick start

pip:

```
pip install hachoir
hachoir-metadata file.mp4
```

## Alternatives

- [AI Voice Detector](https://osinttools.io/tools/ai-voice-detector/): Web detector that scores whether speech in an audio clip is AI-generated, segment by segment, with a free tier and an API. (Freemium · File · passive)
- [ALEAPP](https://osinttools.io/tools/aleapp/): Open-source parser that turns an Android extraction into HTML, TSV, timeline and KML reports of messages, app data and logs. (Open source · File · passive · 1,055 GitHub stars)
- [APKLeaks](https://osinttools.io/tools/apkleaks/): Python CLI that decompiles an Android APK with jadx and scans it for URLs, endpoints and hardcoded secrets. (Open source · File · passive · 6,404 GitHub stars)
- [Apache Tika](https://osinttools.io/tools/apache-tika/): Apache toolkit that detects file types and extracts text and metadata from over a thousand formats, including PDF and Office. (Open source · File · passive · 4,160 GitHub stars)
- [Apktool](https://osinttools.io/tools/apktool/): Open-source tool for decoding Android APK files into readable resources and smali code, and rebuilding them. (Open source · File · passive · 27,387 GitHub stars)
- [Autopsy](https://osinttools.io/tools/autopsy/): Open-source digital forensics platform and GUI for The Sleuth Kit, used to examine disk images, phones and other media. (Open source · File · passive · 3,468 GitHub stars)

All alternatives to Hachoir in one table: https://osinttools.io/tools/hachoir/alternatives/

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
