Diffoscope is a universal diff utility originated in the reproducible builds project.

diffoscope will try to get to the bottom of what makes files or directories different. It will recursively unpack archives of many kinds and transform various binary formats into more human readable form to compare them. It can compare two tarballs, ISO images, or PDF just as easily.

It’s super useful for comparing all kinds of files that go deeper than your regular text file. Be it filesystem images, archives or PDF files.