KDiff3 is an open source file comparison and merge tool

Feb 28, 2020
Updated • Mar 3, 2020
Software, Windows software

KDiff3 is an open source file comparison and merge tool that's available for Windows and Linux. It's a KDE project.

KDiff3 is an open source, cross-platform file comparison and merge tool

Unlike some comparison tools, KDiff3 is capable of three-way comparisons, i.e., you may use it to select up to 3 files or folders for comparison or merging.

Run the program and you'll see a pop-up window overlapping the interface. Select the files or folders to be processed. Let's try it with a couple of documents. The application loads one document in each pane. The differences in the content are highlighted on a color-coded basis.

KDiff3 comparison example

The interface of KDiff3 is made up of a menu bar and a toolbar. The File and Edit menu are for performing basic operations like opening, saving, copy, paste, cut, etc. The address bar at the top of each pane shows the name and the full path of the loaded file. There is a status bar below it that displays the current line number, the encoding format and line end style of the document.

Use the Diffview menu for additional options such as Word Wrap, Diff Windows, add or clear manual alignment, toggle the line numbers, space and tabulator characters, whitespace. Jump to the next conflict, i.e., difference in the content, by using the movement menu.

When the documents contain whitespace at the same lines, a conflict occurs, and you'll have to use the Merge menu to decide which content should be saved in the output document. And since this is a new file, it does not affect the ones which are being merged. You can also right-click on a conflict to view a context menu that allows you to choose which line to use, the one from Document A or B.

kdiff3 merge conflict

This is a fantastic way to observe the changes made between two or three revisions of a document, without manually having to go over it.

Folder Comparison and Operations

KDiff3 can also be used to compare folders and if required, merge them. Comparing 2 folders displays a summary that tells you the total number of files in the directories, how many of those are the same, and the number of different files. Click ok to view the actions that you can choose. Once again it is presented in a color-coded form, and you can see which files exist in Folder A, the ones in Folder B, and the common ones.

Kdiff3 folder comparison

The Folder Menu is activated when you select two directories for comparison. This allows you to merge the folders or specific files. You can also compare selected files. The results can be toggled to show identical files, different files, only those in A or B.

Kdiff3 folder comparison options

For quick operations, you can use the menu item that lets you select all files in a folder. Once you have selected some files for merging or synchronization. Select the Current Item Merge or Current Sync Operation and pick the folder to be used as the source. You can optionally select the "Delete (if exists)" or Do Nothing option to delete or retain the files in the destination folder.

When you're ready, hit F7 or the Start/Continue Folder Merge option to apply the changes. You'll be given an option to simulate the result, which displays a log of the changes that will take place if you actually proceed with the operation. In this example, I  have opted to select folder A as the source. So the contents will be copied to folder B.

kdiff3 folder merge simulation

KDiff3's Options screen can be accessed from the settings menu. It lets you customize the font type, size, colors used for the difference indicators. There are some advanced options that you can define for the merge, folder settings.

Installers for the Windows version of KDiff3 are available at the Binary Factory page. The program is is also available for Linux from the KDE website. There is an older version on SourceForge that is missing some features.

If this isn't your cup of tea, Meld is a good alternative, that's also open source and cross platform.


For Windows

software image
Author Rating
5 based on 2 votes
Software Name
Operating System
Windows, Linux
Software Category
Landing Page

Tutorials & Tips

Previous Post: «
Next Post: «


  1. murray602 said on March 2, 2020 at 9:20 pm

    Sorry- I totally missed the .exe file… thanks for the tip

  2. murray602 said on February 29, 2020 at 9:19 pm

    I would appreciate any pointers on how to convert these binary(?) files into window executables. I assume these are compiled for Linux which I am unfamiliar with. There must be an app somewhere but I don’t know where to start. Thanks

    1. Martin Brinkmann said on March 1, 2020 at 5:57 am

      As Ashwin mentioned in the article, installers for Windows are found here: https://binary-factory.kde.org/view/Windows%2064-bit/job/KDiff3_Nightly_win64/

      1. bawldiggle said on March 2, 2020 at 6:04 am

        [b] kdiff3-master-21-windows-msvc2017_64-cl-dbg.7z
        [a] kdiff3-master-21-windows-msvc2017_64-cl-dbg.7z.sha256
        [c] kdiff3-master-21-windows-msvc2017_64-cl.exe . . . . . 50MB

        Which one is for Windows ?
        [a] is not for Windows , Virus Total returns a blank report
        [b] when extracted it has 119 EXE files, none that resemble a primary EXE
        [c] Virus total returns a risk score of 1/67 but the VT report is empty. No AVs list

        I started to install [c] but got feet …
        Not for the feint hearted.

      2. Martin Brinkmann said on March 2, 2020 at 6:31 am

        Number c is the right one that you can install.

      3. bawldiggle said on March 2, 2020 at 6:07 am

        ie, cold feet

  3. Artem said on February 29, 2020 at 10:53 am

    Meld is much more convenient

  4. Ascrod said on February 28, 2020 at 6:27 pm

    I’ve used KDiff3 on Windows for years, since for a long time it came bundled with GitExtensions. I’ve had weird issues with it on Mint lately, so I’ve started using meld there instead. Still an excellent diff tool nonetheless.

  5. Anonymous said on February 28, 2020 at 3:59 pm

    forgot to ask: can it produce patch files made from the diff?

  6. Anonymous said on February 28, 2020 at 3:57 pm

    binary files arent supported i guess?
    edit: yes, homepage says so. (maybe add that important piece of info above?)

  7. B said on February 28, 2020 at 2:58 pm

    How about WinMerge?

  8. Buzz said on February 28, 2020 at 2:32 pm

    This looks like a great program that I would like to try. Clicking on the link in the summary box at the end of the post brings me to a page with an “Install” button, but clicking it brings up an empty page saying “The address wasn’t understood”. I am using Firefox, how can I download and install this program?

    1. Ascrod said on February 28, 2020 at 9:27 pm

      The KDE link on the page is only for Linux distributions. The Windows version is a little old, but still works quite well and can be found here: http://kdiff3.sourceforge.net/

      @Ashwin can perhaps make a note of this?

      1. Buzz said on March 4, 2020 at 2:20 pm

        Thanks Ascrod. Your insturctions worked.

      2. Ofiri said on April 4, 2020 at 9:54 am

        If you want to see the latest version (the one on sourceforge.net is quite old), you can download the installation binary from project page kde.org:


        Here they are building the code from the project repo every night.

  9. ZeN said on February 28, 2020 at 10:35 am

    I’ve been looking for this type of software for a while now, thanks Ashwin, for the heads up!

    Apart from Meld any other recommendations from the populous would be appreciated too. Thanks in advance. -Z-

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.