As *~quack* pointed out: % xxd b1 > b1.hex % xxd b2 > b2.hex And then % diff b1.hex b2.hex or % vimdiff b1.hex b2.hex