Khallas

Compare two PDF files

Someone sent back an edited contract and you want to know what actually changed? Drop both versions and we compare their text line by line, showing what was removed and what was added, in correct Arabic reading order. The comparison is text-only, no layout and no images, and it all runs on your own device.

Drop your files here

Files are processed on your device and never uploaded

Runs in your browser. Your file never leaves your device.

100% local, nothing uploaded

Three steps, that's it

  1. Drop the older version first, then the newer one

  2. Press Compare the files

  3. See removed and added lines, and copy the result

What does the compare PDFs tool do?

The tool reads the text of both files line by line and matches them against each other, then shows what was removed from the older version and what was added in the newer one. Lines are read in proper reading order, which is what makes the comparison usable on an Arabic contract carrying Latin clause numbers and figures, rather than on English documents alone. The result is text you can copy or download as a text file.

The whole comparison runs inside your browser: neither file is uploaded to a server and neither passes through Khallas. That is the practical difference between this and the comparison sites that ask you to upload both versions of a contract to their servers, because two versions of the same document are usually the most sensitive thing you have: an agreement before signature and after it.

When you need to compare two versions

Most often when a document comes back from the other side after review. A contract you sent to a supplier that returns with changes nobody listed, a quotation reissued with different payment terms, an insurance policy renewed with a different cover limit, or a tender document republished after an addendum. The question in all of them is the same: what actually changed, rather than what you were told had changed.

It happens inside a company just as often: two copies of an HR policy, of a standard employment contract, or of an internal procedure, with nobody sure which is the later one or what separates them. Reading two documents side by side by eye is slow work, and it fails exactly on the line where a single word moved, which is the line that matters.

How to read the comparison output

The output opens with two lines naming the files: the first marked with a minus is the older version, the second marked with a plus is the newer one. Then comes a line counting what was removed and what was added, written in Arabic and English together, because the output itself has no language of its own.

In the body, a line starting with a minus was in the older version and is gone from the newer; a line starting with a plus was added in the newer; and a line starting with two spaces is unchanged, kept to show you where the change sits. A dotted mark followed by a number means that many identical lines were folded away, because the comparison shows the changes and their surroundings rather than the whole document.

The comparison is text-only, and what that means

The tool compares text alone. It does not compare layout, fonts, colours, images or where elements sit on the page, and it does not paint differences over the two pages in colour. Two files whose words match but whose design differs come out here with no differences, and that is not a failure of reading but the boundary of what the tool measures, said plainly rather than dressed up as a visual comparison we do not run.

Matching works on whole lines: if one word changes in a line, the whole line shows as removed and the new line shows as added, so you read the two and see which word moved. A paragraph moved from one place to another shows as removed where it was and added where it now is, because the tool matches lines rather than tracking them around the document.

Comparing an original against a signed, scanned copy

The comparison people need most is between a contract sent out as a typed file and the copy that comes back signed, stamped and scanned. A scanned copy is pictures with no text layer, so there is no text in it to compare. The tool does not treat that as nothing: it names the file it could not read, by the name you gave it, and offers to recognise it here and then finish the comparison without leaving the page.

Recognition runs in your browser too, in Arabic and English together because these documents carry both. How well it reads depends on how clean the scan is, so a difference you see may come from the reading rather than the document: a letter misread, or two lines run together. Read the differences with that in mind, and check any difference in a number or a date against the page itself.

How to compare two PDF files, step by step

  1. Open the compare PDFs page and drop both versions into the tray: the older one first, then the newer.

  2. Check the order of the two files in the list, since the first is treated as the older version, and drag them into order if they landed the wrong way round.

  3. Press compare the files, and the text of each is read and then matched against the other.

  4. If one of the files is a scan, a note names it and offers to read it here; press the read and compare button to finish without leaving the page.

  5. Read the result in the box: a minus for what was removed, a plus for what was added, two spaces for an unchanged line, and a dotted mark with a number for identical lines folded away.

  6. Copy the result out of the box, or download it as a text file that opens in any editor or messaging app.

Limits worth knowing

  • The comparison is text-only: no layout, no images, no fonts, no element positions, and no coloured differences painted over a picture of the page.
  • Only the first two files in the list are compared. If you dropped more than two, remove the extras or reorder the list before running.
  • The order of the two files changes what the output means: the first is the older and the second the newer, so removed means present in the first and gone from the second.
  • Matching is by whole line, so a single changed word shows the line as both removed and added, and a moved paragraph appears in both places.
  • Very long files have only the first of their lines compared, and the output says so in its header rather than staying quiet about it, because the full matching table does not fit in a phone's memory.
  • A scanned file is read here up to 20 pages per scan in one run. The ceiling is technical rather than commercial, because the reading happens inside your own browser.
  • A password-protected file cannot be read until its password is removed, and both files have to be PDFs.

Common problems and their fixes

Every line of the first file shows as removed and nothing was added

That is what happens when the second file holds no text to compare, and the usual reason is that it is a scanned copy. A note now names the file that could not be read and offers to read it here, so press the read and compare button rather than trusting an output that means nothing.

It says the file has no text layer

The file is a scan. The note names the file itself and offers to recognise it inside the page, in Arabic and English together, then finishes the comparison on what it read. If both files are scans, both are read before the comparison runs.

It says there are no differences but the files are not the same

The difference between them is in layout, images, fonts or element positions rather than in the text. The tool compares text alone, so a file that was reformatted without a single word changing comes out here with no differences, and that is a correct result rather than a fault.

A line where one word changed appears twice

Matching is by whole line, so the old line shows as removed and the new one as added. Compare the two neighbouring lines in the output to see which word moved, which is the quickest way to catch a figure, a date or a period that shifted inside a clause.

The output says the files are very long

The pair went past what the device can hold for a full matching table, so the first lines of each file were compared and the header says so. If what matters to you is at the end of the document, split both files with the split PDF tool into matching parts and compare each part on its own.

I dropped three files or more

Only the first two files in the list are compared and the rest are left alone. Remove the extras from the list, or drag it into order so that the two files you want compared are at its head.

It says the file is password protected

The message carries a link to the unlock PDF tool that takes your file with it. Open the file there with its password, then drop the unlocked copy in here alongside the other version and compare them.

Frequently asked questions

What exactly is compared?

The text alone, line by line and in proper Arabic reading order. Layout, fonts, colours, images and element positions are not compared, so two files with the same words and a different design come out here with no differences. Matching works on whole lines, so one changed word shows the old line as removed and the new one as added, and you read the two neighbouring lines to see which word moved.

Does the order of the two files matter?

Yes, and it changes what the whole output means. The first file is treated as the older version and the second as the newer, so removed means present in the first and gone from the second, and added is the reverse. Drag them into order in the list before pressing compare; if they land the wrong way round you read the result inverted, with additions showing as removals.

I dropped more than two files. What happens?

Only the first two files in the list are compared, and the rest are left unread. Remove the extras from the list or drag it into order so the two files you want are at its head, then press compare the files. If you have more than two versions, compare them in pairs, since each run answers one question.

How do I compare a contract against its signed, scanned copy?

Drop both versions in together. The scanned copy is pictures with no text layer, so a note names the file that could not be read and offers to recognise it inside the page, in Arabic and English together, then finishes the comparison on what it read. How well it reads depends on the scan, so check any difference in a number or a date against the page itself.

How do I read the minus and plus marks in the output?

The first two lines name the files: the first with a minus is the older version, the second with a plus is the newer, followed by a line counting what was removed and added. In the body, a minus marks a line that was in the older and is gone, a plus marks a line that was added, two spaces mark an unchanged line kept for context, and a dotted mark with a number means identical lines were folded away.

Are the files uploaded to a server to be compared?

No. The text of both files is read and matched inside your browser alone, so neither passes through a server or through Khallas, and the same is true of recognising a scanned copy. That is the practical difference from comparison sites that ask you to upload both versions to their servers, because a contract before signature and after it is usually the most sensitive thing you have.

Does the tool show differences in layout and images?

No, and it does not paint coloured differences over pictures of the two pages. The comparison is text-only, so a change in formatting, in a font, in a logo or in where a table sits will not appear here, and that is a correct result rather than a fault. To see the two pages side by side, turn both files into pictures with the PDF to images tool and compare them by eye.

Tools that go with this one

All tools

Every tool runs inside your browser without uploading the file.

More uses

From the blog