TL;DR — Quick Summary

hexyl is a modern hex viewer for the terminal. Color-coded bytes, ASCII sidebar, offset display — inspect binary files beautifully with a command-line xxd alternative.

hexyl makes binary files readable. Color-coded hex dump with ASCII sidebar — xxd with superpowers.

Installation

# macOS
brew install hexyl

# Arch Linux
sudo pacman -S hexyl

# Cargo
cargo install hexyl

Usage

# View file contents
hexyl file.bin
hexyl photo.jpg
hexyl /usr/bin/ls

# Limit output
hexyl --length 512 file.bin       # First 512 bytes
hexyl -n 256 file.bin             # Short flag

# Skip bytes
hexyl --skip 1024 file.bin        # Skip first 1KB

# Specific range
hexyl --skip 100 --length 64 file.bin

# From stdin
echo "Hello, World!" | hexyl
curl -s https://example.com | hexyl --length 256

# Display options
hexyl --no-characters file.bin    # No ASCII sidebar
hexyl --no-position file.bin      # No offset column
hexyl --plain file.bin            # No colors
hexyl --panels 2 file.bin         # Two panels side by side

Color Coding

ColorByte Type
BlueNULL bytes (0x00)
GreenASCII printable
YellowASCII whitespace
RedASCII control codes
MagentaNon-ASCII (0x80-0xFF)

Summary

  • hexyl displays hex dumps with color-coded byte categories
  • ASCII sidebar shows printable characters alongside hex
  • Skip bytes, limit output, read from files or stdin
  • Color-coded: NULL (blue), printable (green), whitespace (yellow), non-ASCII (magenta)
  • Written in Rust — fast, from the creator of bat and fd