Skip to content

How-to

How to check two PDFs are identical

Two PDFs can look the same on screen and still be different files. Or they can be perfect copies with different names. Looking is not a reliable way to tell. The reliable way is to calculate a checksum for each file and compare. This guide shows how, with a free browser tool or with commands your computer already has, and explains why look-alike files so often do not match.

Updated · 5 min read

Signavos: send a PDF for signature, pay only per document. Credits never expire.Try it free

Identical, or just similar-looking

"Identical" can mean two different things, and it helps to pick one before you start.

  • Byte-identical: every single byte in both files is the same. File names do not matter. This is what a checksum comparison tests.
  • Visually identical: the pages look the same when you view them. The underlying files can still differ in many ways that you cannot see.

If you need to know that a signed contract is exactly the file that was signed, you want byte-identical. If you only need to know that two reports say the same thing, a visual comparison may be enough. A checksum cannot tell you about the second case: it answers only whether the files are the same, not how similar they are.

Compare two PDFs with the free verify tool

The free verify tool calculates the SHA-256 checksum of any file in your browser. Nothing is uploaded, and you need no account. It compares one file against one value, so to compare two files you run it twice.

  1. Open the verify tool and choose the first PDF. The tool shows its 64-character SHA-256 checksum. Copy it.
  2. Reload or clear the tool, then choose the second PDF.
  3. Paste the first file's checksum as the value to compare against. Spaces and letter case are ignored.
  4. Read the result. A match means the two files are byte for byte identical. A mismatch means they are not.

If one of the PDFs is a document signed through Signavos, you do not need to hash it first. Upload its Certificate of Completion alongside the other file and the tool reads the "Final signed PDF" checksum from it.

Compare two PDFs with commands you already have

Every major operating system can print a SHA-256 checksum. Run the command on each file and compare the two long strings.

SHA-256 commands by system
SystemCommandWhere to run it
macOS and Linuxshasum -a 256 file.pdfTerminal
Windowscertutil -hashfile file.pdf SHA256Command Prompt
WindowsGet-FileHash file.pdfPowerShell (SHA-256 is the default)

Replace file.pdf with the real file name, or its full path if you are not in the same folder. Run it once per file. If the two strings are exactly the same, the files are identical. Case does not matter, so a string in capitals and one in lowercase can still be the same value. If a single character differs, the files are different, and which character differs does not matter.

Why two PDFs that look the same can fail to match

A PDF is a container. The pages you see are one part, and the rest is structure, metadata and the way the content is packed. Many everyday actions rewrite that container without changing a word on the page.

  • Opening a PDF in a reader or editor and saving it again, even with no changes.
  • Printing to PDF, which builds a new file from the printed output.
  • Compressing, "optimising" or merging files.
  • Exporting the same source document twice, which usually stamps a fresh creation time into each file.
  • Scanning the same paper page twice. No two scans are the same bytes.
  • A download that was interrupted or corrupted along the way.

In every one of those cases the pages can look perfect and the checksums still differ. That is the checksum doing its job. It is strict by design, because a signed contract must be exactly the file that was signed, not a rebuilt copy that looks like it.

Reading the result

A match is a strong answer. If two checksums are equal, the two files are the same file, and the chance of two different files sharing a SHA-256 value is not a practical concern. What is a SHA-256 checksum goes into why.

A mismatch is a weaker answer than it feels. It tells you the files differ, not whether the difference matters. If you suspect one of them was changed, the next step is to find out where each file came from and fetch a fresh copy of the one you doubt. How to tell if a PDF has been altered covers what you can and cannot conclude.

One more limit. Checksums prove two files are the same. They do not prove either file is the right one, or who signed it, or when. For a document sent through Signavos, those answers live in the Certificate of Completion and the audit trail.

Make comparisons easy next time

Comparing two files after the fact is only half the job. If the file matters, record its checksum on the day it becomes final and keep the note somewhere separate. Then any future copy can be checked against the record in seconds, without needing the original to hand.

Keep the original download untouched, and make working copies for anything you want to mark up or merge. How to store signed contracts so they hold up lays out a simple routine.

This is general information, not legal advice.

Compare your files with the free verify tool, or send your next document for signature with Signavos and get the final-file checksum recorded on the certificate.

Frequently asked questions

Does the same file name mean the same file?
No. Names are just labels, and two different files can share one. Equally, two identical files can have different names. Only comparing checksums tells you whether the contents are the same.
Can I compare two PDFs without installing anything?
Yes. The free verify tool runs in your browser, needs no account and does not upload either file. Hash the first file, copy the checksum, then check the second file against it.
Why do two exports of the same document not match?
Most programs write extra details into each export, such as a creation time or a unique ID. The pages look the same but the bytes differ, so the checksums differ. That is normal and not a sign of tampering.
Will the checksum show me which page is different?
No. A checksum is one fingerprint for the whole file. It says the files match or they do not. To find a difference, you need to compare the pages yourself.
Is a matching checksum proof that a document is genuine?
It proves the two files are identical, nothing more. It does not prove who made or signed the document. For that, use the signing record, which for Signavos is the Certificate of Completion and the audit trail. It is an integrity check, not a PKI digital signature.

Send your next document without a subscription.

Upload a PDF, place the fields, send. Your recipient signs without an account and you pay per signature. Nothing renews and credits never expire.

Create a free account