Flexible CLI tool for printing files and data in multiple bases.
Find a file
2026-01-28 14:30:09 +08:00
src Added tests 2026-01-28 12:52:05 +08:00
.gitignore Initial commit 2026-01-15 17:04:35 +08:00
Cargo.lock Added boldness, changed byte_format.rs, changed README.md 2026-01-27 11:16:05 +08:00
Cargo.toml Update Cargo.toml 2026-01-28 13:05:49 +08:00
LICENSE Initial commit 2026-01-15 17:04:35 +08:00
README.md Updated README.md 2026-01-28 14:30:09 +08:00

hexetta

hexetta is a flexible, modern command-line utility for viewing files in multiple bases, such as binary, hexadecimal, and ascii.

It's more customizable and powerful than hexdump and xxd, with features like:

  • Colored output
  • Custom bases with custom alphabets
  • Extremely customizable output
  • A customizable position indicator

Installation

Install via Cargo:

cargo install hexetta

Or build from source:

git clone https://codeberg.org/RevlSoftware/hexetta
cd hexetta
cargo build --release

Or get prebuilt binaries from releases

Usage

Usage: hexetta [OPTIONS] [FILES]...

Arguments:
  [FILES]...  Input files; with no FILE, or when FILE is -, read standard input

Options:
  -c, --columns <COLUMNS>
          Amount of bytes per base [default: 16]
  -l, --layout <LAYOUT>
          LAYOUT is a sequence of bases
          A base is a number followed by any character (a backslash to use the default alphabet), and then that number of letters
          Or one of the pre-defined base below
              - b        binary
              - q        quaternary
              - o        octal
              - d        decimal
              - h        hex
              - a        ascii
           [default: ha]
  -p, --position-indicator...
          Toggle position indicator
  -t, --trailing-posind...
          Toggle trailing position indicator
  -B, --byte-delimiter <BYTE_DELIMITER>
          Print BYTE_DELIMITER between each byte [default: " "]
  -A, --ascii-byte-delimiter <ASCII_BYTE_DELIMITER>
          Print BYTE_DELIMITER between each byte in the ascii base [default: ""]
  -S, --base-delimiter <BASE_DELIMITER>
          Print base_DELIMITER between each base [default: "    "]
  -P, --posind-delimiter <POSIND_DELIMITER>
          Print POSIND_DELIMIITER between position indicator and first base column [default: "  "]
  -L, --line-delimiter <LINE_DELIMITER>
          Print LINE_DELIMITER between each line [default: "\n"]
  -F, --file-delimiter <FILE_DELIMITER>
          Print FILE_DELIMITER between each file [default: "\n"]
  -m, --merge-files...
          Toggle whether to merge all files into one file, ignoring FILE_DELIMITER
  -u, --unprintable-char <CHAR>
          Print CHAR when an unprintable ascii char is found [default: .]
  -C, --color <COLOR>
          Color the output
          COLOR is:
                  - 'true', 'on' or '1' to turn coloring on
                  - 'ascii' to turn coloring on only for ascii
                  - 'false', 'off', or '0' to turn coloring off
           [default: false]
  -b, --bold...
          Toggle boldness
  -h, --help
          Print help
  -V, --version
          Print version

Examples

Dump file

hexetta file

Dump 3 files

hexetta file1 file2 file3

Dump file with 8 columns per base (instead of 16)

hexetta -c 8 file

Dump file with decimal and ascii layout

hexetta -l da file

Dump file with colored and bolded output

hexetta -C on -b file