If you deal with the command line, you've probably used hexdump or od to dump binary files, but what do you do if you have a hex dump and want to convert the data to binary? If your requirements aren't too complicated, the solution could be xxd. xxd can dump binary files in the same way that hexdump and od can, but it can also do the opposite: convert a hex dump to binary.
xxd outputs data in a reasonably conventional hex dump format when executed with merely a file name:
# xxd bdata
0000000: 0001 0203 0405
You can now convert the hex dump back to binary by pipeing the output back to xxd with the -r option and redirecting it to a new file:
# xxd bdata | xxd -r >bdata2
# cmp bdata bdata2
# xxd bdata2
0000000: 0001 0203 0405