What's a good hex editor/viewer for the Mac?

Mike Akers picture Mike Akers · May 6, 2009 · Viewed 151.7k times · Source

What's a good hex editor/viewer for the Mac? I've used xxd for viewing hexdumps, and I think it can be used in reverse to make edits. But what I really want is a real hex editor.

Answer

Ayman Hourieh picture Ayman Hourieh · May 6, 2009

To view the file, run:

xxd filename | less

To use Vim as a hex editor:

  1. Open the file in Vim.
  2. Run :%!xxd (transform buffer to hex)
  3. Edit.
  4. Run :%!xxd -r (reverse transformation)
  5. Save.