View on GitHub

Devendra's Log

Convert ASCII Hex text to binary

Debugging sometimes means dumping a hex stream to the console, or to a log file, something like 0x0a 0xff…

I wrote a simple command line tool to convert that kind of hex data to binary. Users of Linux can resort to the fine xxd utility to do the same thing.

The following are all valid hex values and produce the same binary

The following are invalid and will result in an error