Guide
A hex editor for macOS, beside the text
Some questions have no answer except the bytes. Which byte is between those two words? Is that a tab or four spaces? What is the header of this file? Here is how to look, on a Mac, without leaving the editor and without a separate tool that knows nothing about the text.
What the Mac gives you
xxd file | less and hexdump -C file print a dump you can
read and cannot edit. dd will write a byte at an offset you have worked
out yourself, once, with no undo. Hex Fiend is a good free hex editor and is a hex
editor: it shows you bytes, not the text those bytes are.
The gap is the common case. You are reading a file, something in it is wrong, and the question is what is actually there — one question, in the middle of ordinary work.
The bytes in the pane beside the text
View ▸ Show Hex Editor (⌃⌘X) puts the dump next to the document: the offset, the bytes in groups of eight, and the printable characters beside them. It follows the caret, so moving about in the text moves the dump to the same place, and each shows what the other did — text typed in the editor redraws the dump, bytes typed in the dump redraw the text, and one undo reaches both.
It is editable. The caret stands between two bytes the way it stands between two characters; type hex digits and they go in. Drag or shift-arrow to select a run, typing or pasting replaces it, and ⌘C copies the bytes.
Overwrite Mode patches in place. The same switch the text has: typing changes the byte under the caret instead of inserting one, which is what patching a file without moving anything after it means. ⌥⌘V writes the clipboard over the bytes from the caret on.
It says where it is. A click on a byte puts the caret in front of or behind it and the pane says which: Offset 300, before 0x4A. The offset field takes hex or decimal, and it shows 64 KB at a time with two buttons to page through — so a file far larger than memory can be inspected at any offset in it.
It tells you when the bytes are not the file’s. A file in UTF-16 or EBCDIC, one with NEL or U+2028 between its lines, or a compressed one is edited as UTF-8 with LF line breaks and written back in its own form — so the pane says plainly that what you are looking at is the working text, not the file on disk.
What people actually use it for
- Finding the byte that breaks a parser: a stray 0x00, a BOM nobody expected, a CR without its LF.
- Reading a header: what this file claims to be, in the first sixteen bytes.
- Patching one value in a binary-ish file — a length, a flag, a string — without moving anything after it.
- Checking what a mainframe extract really contains before deciding which code page to read it as.
- Answering "is that a tab?" in one keystroke rather than in a terminal.
And the other inspectors
The hex pane is one of several answers to "what is actually in this file". Character Inspector (⌥⌘I) says what one character is — its code point, its name, its bytes in this file’s character set. Show Invisible Characters marks spaces, tabs and the ones worth worrying about: non-breaking spaces, zero-width characters, control characters drawn as pictures of their own names. Compare Character Sets… shows the same bytes read every way, side by side. Clean Up Document… lists what is in the file that is not in the text and takes out what you tick.
Questions
Can I edit bytes, or only look at them?
Edit. Type hex digits, select, cut, copy, paste, and undo — shared with the text, so one undo takes back either.
Does it work on very large files?
Yes. It shows 64 KB at a time with an offset field that takes hex or decimal, so any offset in a file larger than memory can be inspected.
Can I patch a byte without changing the file's length?
Yes — Overwrite Mode, the same switch the text has, or ⌥⌘V to write the clipboard over the bytes from the caret on.
Do the text and the bytes stay in step?
Yes. The pane follows the caret, each redraws when the other changes, and one undo reaches both.
What about a file in EBCDIC or UTF-16?
Those are edited as UTF-8 and written back in their own form, and the pane says so rather than letting you think you are looking at the file on disk.
Is it a replacement for a dedicated hex editor?
For inspecting and patching while you work on a file, yes. For hours of binary reverse engineering, a dedicated tool has more of what that job needs.
Look at the bytes yourself
Volt is in free beta. Download it now — no account, no sign-up — and try it on the file you have in mind. Each build runs for seven days, and every update gives another seven.
macOS 13 or later, Apple silicon. About 7 MB, signed and notarised. Everything it does · what changed in this build.
Related
- Mainframe files on a Mac — records, RDW and copybooks.
- EBCDIC on macOS — 62 code pages and the NEL line ending.
- Everything Volt does — the complete list, searchable.
- Every file Volt opens — languages, character sets, records.