Assuming you have a long string of hex digits, e.g. "0c0d0a0a0a0aaccde0af". Cat or pipe it into: xxd -r -p > output.binary