Introduction
Classic xxd and hexdump print raw hex blocks without visual hierarchy — every byte looks the same. hexyl categorizes each byte into ASCII printable, ASCII whitespace, non-ASCII printable, or NULL/control, and tints each class differently. Scanning for magic numbers, string offsets, or corruption becomes a visual rather than algebraic task.
What hexyl Does
- Prints offset, hex bytes, and ASCII sidebar.
- Colorizes bytes by category.
- Accepts file paths or stdin.
- Supports
--skip,--length,--nosqueeze,--borderoptions. - Uses terminal width to fit panel count.
Architecture Overview
hexyl reads bytes in large chunks, classifies each with a table lookup, and pipes styled ANSI through termcolor. Panels auto-adjust to terminal width. No background threads — a simple synchronous Rust binary.
Self-Hosting & Configuration
- Install via brew, cargo, apt, dnf, scoop.
- Config is entirely flags — no dotfiles.
NO_COLOR=1for monochrome.- Useful with
less -Rorbat. - Pairs with
fd | xargs hexylfor batch preview.
Key Features
- Colored byte categories — scan like a pro.
- Stdin-friendly for network/streaming inspection.
--skip/--lengthfor targeted windows.- Nice borders and offset hints.
- ~1.5MB static binary.
Comparison with Similar Tools
- xxd — ubiquitous; no color.
- hexdump -C — POSIX; dense, no hierarchy.
- bvi / hte — interactive hex editors.
- radare2 — full reverse-engineering toolkit; overkill for viewing.
- Hex Fiend — macOS GUI.
FAQ
Q: Can it edit files? A: No — read-only. Use bvi or radare2 to edit.
Q: Unicode-safe? A: It shows bytes, not glyphs — UTF-8 multi-byte chars appear as non-ASCII group.
Q: Panel count?
A: Auto-sized; override with --panels 2.
Q: Works in CI logs?
A: Pass --color always or pipe through aha for HTML.