A terminal hex editor for large files, written in Rust.
hxedit focuses on correct byte-level editing semantics first: non-destructive editing, full undo/redo, search, format inspection, and optional executable/disassembly browsing.
- Fixed byte-column header (
00 01 02 ... 0Fby default) for quick column lookup while scrolling - Non-destructive byte editing with three distinct operations:
- overwrite in place
- real insert
- tombstone delete
- Full undo / redo across edits, paste, replace, and inspector writes
- ASCII and hex search with forward/backward traversal, wrap-around, and visible-hit highlighting
- Built-in format inspectors for ELF, PE/COFF, Mach-O, PNG, ZIP, GZIP, GIF, BMP, WAV, TAR, and JPEG
- Hashing for MD5, SHA1, SHA256, SHA512, and CRC32
- Clipboard copy/paste, export, fill/zero/xor/replace transforms
- Read-only synchronized diff page against another file (
:diff) - Large-file support through paged I/O and cache
- Optional disassembly browsing, symbol search, and inline assemble patching
Run from source:
cargo run -- <file>Example:
cargo run -- --readonly --offset 0x100 --inspector some.binIf you already built the binary:
hxedit some.binhxedit ships in three feature bundles:
| Bundle | Build command | Includes |
|---|---|---|
core |
cargo build --release --no-default-features |
Hex editor, inspector, search, diff, hash, copy/paste, export |
default |
cargo build --release |
core + disassembly view, instruction search, symbol panel |
full |
cargo build --release --no-default-features --features full |
default + Keystone-backed inline assemble patching |
Notes:
defaultis the normal build.fullvendorskeystone-engineand enables inline assembly patching inside:dis.- There is no separate
:asmcommand.
| Flag | Description |
|---|---|
--readonly |
Open without write access; automatically falls back to read-only when needed |
--offset <n|0xhex> |
Start at a specific byte offset |
--inspector |
Open with the side panel visible on the inspector page |
--bytes-per-line <n> |
Bytes shown per row, default 16 |
--page-size <n> |
Page-cache read size, default 16384 |
--cache-pages <n> |
Page-cache capacity, default 128 |
--profile |
Print diagnostics to stderr on exit |
--no-color |
Disable colors; NO_COLOR also disables styling |
| Command | Description |
|---|---|
:w / :w <path> / :wq |
Save / save as / save and quit |
:u [n] / :redo [n] |
Undo / redo |
:g <offset> / :g end / :g +n / :g -n |
Goto |
:s <text> / :s! <text> |
ASCII search |
:S <hex> / :S! <hex> |
Hex search |
:p / :pi / :p? / :pi? |
Overwrite / insert paste and previews |
:c [fmt] [disp] |
Copy the active selection |
:export <path> / :export c / :export py |
Export logical bytes |
:xor <key> / :xor! <key> |
XOR active selection to clipboard / XOR in place (key: decimal 0..255 or hex 0x00..0xff) |
:fill <pattern> <len> / :zero <len> |
Overwrite transforms |
:re ... / :re! ... |
Equal-length replace / length-changing replace |
| `:hash md5 | sha1 |
:diff <path> / :diff -n <N> <path> / `:diff refresh |
next |
:insp / :insp more |
Open inspector / reveal more paginated entries |
:format ... |
Force format |
Disassembly-related commands in default / full builds:
| Command | Description |
|---|---|
:dis [arch] |
Enter read-only disassembly view for recognized ELF / PE / Mach-O executables |
:dis! <arch> <offset> |
Force raw disassembly from a display offset |
:dis off |
Leave disassembly view |
:si / :si! |
Search decoded instruction text |
:symbol / :symbol! |
Search by symbol name |
:sym / :sym off |
Open / close the symbol panel |
:data / :data off |
Open / close the cursor-relative data panel |
Tagged releases publish an explicit OS * arch * feature matrix.
Current release matrix:
linux/x86_64/corelinux/x86_64/defaultlinux/x86_64/fulllinux/aarch64/corelinux/aarch64/defaultlinux/aarch64/fullmacos/aarch64/coremacos/aarch64/defaultmacos/aarch64/fullwindows/x86_64/corewindows/x86_64/defaultwindows/x86_64/full
hxedit is distributed under GPL-2.0-only.