xxdiff: Graphical File And Directories Comparator And Merge Tool

Table of Contents


This is the official home of xxdiff, a graphical file and directories comparator and merge tool.

xxdiff is provided under the GNU GPL open source license. It has reached stable state, and is known to run on many popular unices, including IRIX, Linux, Solaris, HP/UX, DEC Tru64. It has been deployed inside many large organizations and is being actively maintained by its author (Martin Blais).


  • Comparing two files, three files, or two directories (shallow and recursive);
  • Horizontal diffs highlighting;
  • Files can be merged interactively and resulting output visualized and saved;
  • Has features to assist in performing merge reviews/policing;
  • Can unmerge CVS conflicts in automatically merged file and display them as two files, to help resolve conflicts;
  • Uses external diff program to compute differences: works with GNU diff, SGI diff and ClearCase's cleardiff, and any other diff whose output is similar to those;
  • Fully customizable with a resource file;
  • Look-and-feel similar to Rudy Wortel's/SGI xdiff, it is desktop agnostic (i.e. will work equally well with KDE or Gnome);
  • Features and output that ease integration with scripts.

xxdiff was (and probably still is) tested daily in a merge reviewing/policing context by more than 50 engineers at discreet, and since this task is a significant part of their development process, many of the features are a direct result of suggestions from these people while the author was working there.

New releases and updates are announced on freshmeat. You can register for notification at either freshmeat or sourceforge. xxdiff is implemented in C++ and its runtime dependencies is only the Qt UI toolkit from TrollTech.

Unicode and Inline Editing

xxdiff does not support comparing files encoded with Unicode. Also, it does not support inline editing of the diffed files. If you need these features, you could try emacs or Meld (although both of these lack some of the most interesting features of xxdiff).




xxdiff comes with a bunch of wrapper Python scripts that invoke xxdiff in creative ways. The author has been using these for a long time now and decided for version 3.0 to clean them up and make them a little more generic so everyone can use them.

  • xxdiff-cond-replace: conditional to a user's acceptance (or merge decision), replace an original file by a new file (typically the result of some external process). This is useful in shell loops, a general purpose interactive conditional copy operation;

  • xxdiff-find-grep-sed: walk a directory hierarchy, and perform a conditional sed replacement on a given pattern, accepting, rejecting or merging each change graphically;

  • xxdiff-encrypted: compare contents of encrypted files and merged into encrypted file. This script takes care of decrypting the input files and encrypting the merged output file with gpg.

  • xxdiff-match: run xxdiff on a arbitrary set of files, matching pairs or triples of files by basename. This effectively allows you to do something like this:

    xxdiff-match srcold/*.c srcnew/*.c
  • xxdiff-patch (UNFINISHED): preview and accept/reject a patch to a set of files. This script is unfinished because we have not been dealing with file additions and deletions, feel free to chip in;

  • xxdiff-cvs-diff: preview CVS changes and if desired accept/reject changes to commit individually;

  • xxdiff-subversion: wrapper for xxdiff that you can use to set the diff-cmd and diff3-cmd user configuration values for subversion.

Working versions and help files for scripts that support configuration management systems can be found in the distribution under the tools/ directory (CVS, ClearCase, etc.).


Packages are available for some specific operating systems. Here are links to the relevant pages. The author does not publish binaries anymore.

Reporting Bugs

PLEASE! report bugs using the bug tracker instead of email. It is extremely simple, quick and easy to use, you don't even have to have a SourceForge account, and it allows me to track issues and desired features, as well as keep a history and dates. Please do not send the author email about bugs. Log them, you don't even need a SourceForge account. Thank you.



Build dependencies are:

  • Qt-3.2 or higher
  • tmake
  • a C++ compiler, flex and yacc

Runtime dependencies are:

  • Qt-3.2 or higher


xxdiff is known to build and work on a great majority of UNIX platforms where Qt works. It has also been ported it to Mac OSX.

External Links

Copyright and License

Copyright (C) 2001-2004 Martin Blais. All Rights Reserved.

This code is distributed under the GNU General Public License;


Martin Blais <blais@furius.ca>

SourceForge Logo