gitmyhub

hexyl

Rust ★ 10k updated 1mo ago

A command-line hex viewer

hexyl is a color-coded command-line hex viewer for inspecting the raw bytes of any file, it uses distinct colors for null bytes, printable text, whitespace, and binary data to make patterns easy to spot.

Rustsetup: easycomplexity 1/5

hexyl is a command-line tool for viewing the raw contents of any file in hexadecimal format. Hexadecimal is a way of displaying binary data that developers and low-level programmers use to inspect files at the byte level, which is useful when working with formats that are not plain text, debugging file corruption, or understanding how a program stores data on disk.

The main thing hexyl adds on top of similar tools is color. It assigns different colors to different types of bytes: null bytes, printable text characters, whitespace, other ASCII characters, and non-ASCII bytes each get a distinct color. This makes it much easier to spot patterns or identify what parts of a file contain readable text versus binary data.

The tool is written in Rust and is available through the package managers of most major Linux distributions, including Ubuntu, Debian, Fedora, Arch Linux, Void Linux, Gentoo, and FreeBSD. It is also available via Homebrew and MacPorts on macOS, and via Cargo (the Rust package manager) on any platform including Windows. Pre-built binary downloads are on the releases page for systems without a package manager option.

The README is mostly an installation guide across different operating systems and package managers. There is no extended usage documentation in the README itself, though the tool ships with a manual page that can be generated from the included Markdown source using a tool called Pandoc. The license is dual Apache 2.0 and MIT, so you can use it under either.

Where it fits