Stack OverflowGraphical diff for Mac OS X
[+481] [24] user26480
[2008-10-09 12:37:55]
[ osx diff ]

Where can I find a convenient graphical diff-tool for Mac OS X (freeware)?

(44) casperOne: This question, (as you can see) has great popularity. Diffing files is an programming question, it is about programming tool. I'm really happy with this question, answers helped me a lot. I'm really don't understand your diamond cut. - jm666
(1) @jm666 the problem is that this is an open-ended question with no single right answer. No matter how useful this question may seem, it isn't the right fit for a Q&A website like Stack Overflow. - Michael Martin-Smucker
(1) @Michael Martin-Smucker, I understand, or at least trying to understand. The mission of SO is lowering the entropy. In the programming (fortunately) never exists only "one right" answer. I voted too, many times to close question what was "wrong". In this case - the question and answers are really helpful (and lowers entropy). Great power = great responsibility. [(c) Spiderman] Thank you for your answer - this discussion should be on meta anyway. ;) - jm666
Look at… p.s. —- It’s stupid practice to leave answers accessible but lock them for the option of allowing a better answer, so I’m writing my answer here in the comments. - Maxim Veksler
Can't believe Finder integration hasn't been mentioned in a single answer so far, this is killer for me. - HaggleLad
@MichaelMartin-Smucker I have news for you. In the world of programming there is never ONE right answer. - Jakobud
@Jakobud Thanks for the healthy dose of condescension. As I'm sure you're aware, there's a difference between a question with multiple correct answers and an open-ended question. The FAQ takes a pretty clear stand on open-ended questions. - Michael Martin-Smucker
(1) None of the suggested tools are free and work on retina display! - Tushar Mathur
[+421] [2008-10-09 12:49:22] Johan Lübcke [ACCEPTED]

FileMerge [1]. It is included when you install Xcode [2], and available from the command line using the opendiff command.

FileMerge can handle utf8: just type find ./ -name "*" -exec xattr -w 'UTF-8;134217984' {} \; in whatever directories your files are.


perfect, thanks! - user26480
(55) You can open FileMerge from the command line using the opendiff command. - Ferruccio
(7) Pay attention, does not support UTF-8 files. - Jakob Stoeck
(5) @Jakob: it doesn’t? I’ve compared UTF-8 files using it. Are there bugs? - Paul D. Waite
(13) Also you can use these excellent scripts to integrate FileMerge with svn diff: - David
@Paul same situation for me: - elliottcable
(1) Here's an article which helped me out: Using FileMerge as the diff/merge tool for git.… - nickf
(11) Is there anyway to do a merge where you can edit the results with FileMerge? It seems like all I can do is pick a delta and say use left or use right. Am I missing something here? - orange80
Even shows when line endings differ - nice! - Andrew Swan
(2) You can enhance this a bit further with automator. New Service - Service receives selected: Files and Folders Add the following steps: Get Selected Finder Items Set value of Variable - create a new one Set value of Variable - create a new one Run Shell Script - Pass input: as arguments opendiff "$1" "$2" Now you can right click on two selected in finder and diff them. - ddowns
Sadly, XCode is no longer free. - chaiguy
XCode may not be free, but you might be able to get the version compatible with your Mac on the Applications disc that comes with your Mac. I just installed it today for a MacBook Pro with Mac OS X (10.6.8) purchased a month or two ago. I don't know if this is also true for more recently purchased macs. - ember
(2) FileMerge is one of the worst pieces of crap I've ever seen shipped by Apple - Lohoris
(10) I can't believe this gets 200 up votes. I have tried so hard to use File Merge, but without full directory comparisons and full editing of both files, I just don't see any value at all... Especially when you're dealing with patching bad old open source packages (like let's say OSCommerce?). Beyond Compare in a VM has been the best thing ever... - iJames
(1) @iJames directory compare is possible with opendiff syntax from the command-line. opendiff dir1 dir2 outputofmergedir and voila. Admittedly, the UI wasn't terribly helpful in finding that functionality, but I'm not impressed at all by XCodes user interface "ease of use". Seems like that is reserved for end-user apps, not Apple devs! - Norman H
(1) @iJames You can edit the merged file in FileMerge quite easily -- there's a pane at the bottom that shows the merged file (you may need to drag the "windowshade" control up to see it). - Marnen Laibow-Koser
@orange80 My previous comment addresses your question too. - Marnen Laibow-Koser
@Lohoris Why do you say that? I find that it works very well. - Marnen Laibow-Koser
[+112] [2009-05-23 06:38:13] ehnmark

Sourcegear's DiffMerge is another good, free alternative:

DiffMerge does inline editing and seems to be using a better diff algoritm than FileMerge is.

(7) DiffMerge also has the huge advantage, in my mind, that it also can perform folder diffs. This allows comparing large sets of files to be much faster. - lilbyrdie
(1) This works much better than FileMerge for me. Especially if comparing compacted scripts which can be many K all on one line. DiffMerge will highlight the line and the actual position of the difference. - mckamey
(7) It has "apply change from left" but not "apply change from right" W T F ? ! ? Is that serious? That must be some kind of ugly joke... btw, you can't even edit the keybinding lol. Slightly less crappy than FileMerge but still completely useless anyway. - Lohoris
True that you can only merge one way. However, besides this minor setback, DiffMerge is very easy to use, very similar to WinMerge. I tried kdiff3 and did not like it because it gives a directory view of differences instead of a flat file view, making it harder to navigate the results, has UI refresh issues when resizing window and crashed on me. - HZC
Why the heck can't you merge two files independent of the common ancestor view? It's a bit ridiculous... - Jon
DiffMerge, which I've been using for years, crashes with more complex files. I'm here looking for an alternative. - grigb
[+59] [2010-04-02 05:04:25] jm1234567890

I recommend

Filemerge crashes on large (2 meg) files.

(3) Dang, I wish your answer had more upvotes because I can't get filemerge to work with large files, like you said. - Chris
(1) kdiff3 is awesome. 3-way merges for the win! - William Denniss
(4) kdiff3 doesn't let you edit the proposed output by hand right there in the tool. It only allows you to accept one of the three proposed chunks. Sometimes you want something from 2 or more chunks (same line) and you just have to do it by hand right there in the merge resolution pane, kdiff3 does NOT allow for this. - cmcculloh
@cmcculloh does opendiff allow this? (Yes I can go test it myself but I think other readers will benefit if we point out which tools DO allow the editing of proposed merge) - Steven Lu
@StevenLu no idea. I'm extremely unsatisfied with every graphical merge tool that I've found for Mac. - cmcculloh
(1) @cmcculloh Not true. I've been editing in the merge pane of kdiff3 for a couple of years, on Windows and OSX. Just click and start typing. It denotes the change with an 'm' in the left column. - LVB
Nice! I'll give that a try @LVB - cmcculloh
[+49] [2010-06-15 15:15:27] mutewinter

Kaleidoscope [1]

Paid, but it has the best looking UI of any diff tool I've seen for Mac. Kaleidoscope also does a very nice job of breaking down which words differ inside lines and nicely wrap long file formats like html so the atomic changes are more graphically evident. Compared to line based diff tools, this is a nice step up.

Features (given in the comments) like diffing folders and merging (including 3-way merge) are supported to some degree in version 2.0 [2].


(10) I love Kaleidoscope, but it is hamstrung by the fact that it doesn't do three-way merging. Hopefully they will remedy that in the next major release. Image diffing is awesome, though! - Tim Keating
(19) Yes, and it doesn't compare folders either. Nonsense. - Greg Combs
Kaliedoscope is a spectacular app, and I've found the developers to be very responsive to comments and suggestions. They've probably heard both of those already, but it's got great git integration (as well as other scm's I think) and I'd happily pay for it all over again if I had to. I have to agree that it's got the best looking UI and that is very important when you're looking for a visual diffing tool. - masukomi
(6) It doesn't do 3 way merge, cute but limited - Olivier Refalo
(19) AFAIK it doesn't do any merge. It does diff- no editing/merging. Quite useless to me. - therealsix
Definitely a very pretty diff tool. - LuxuryMode
(3) Very nice tool but like others have said, not merging makes it almost pointless for me (still use it to diff before I push to a remote repository with git). - ryanzec
(2) Doesn't have any diff options like ignore white space, etc. - mifki
Without merge it's not worth the price IMO. - timoxley
(3) Kaliedoscope 2 Beta support merge and editing. - ArtFeel
(4) Update: Kaleidoscope v2.0 which was released on Jan 17, 2013, now with text merge, 3-way merge, and folder comparison. - Jing Li
[+28] [2008-10-09 13:40:20] Brian Webster

These aren't all freeware, but if you're looking for something with a few more features, a couple other options include:

Changes, a nice looking shareware tool that will diff folder hierarchies and files

TextWrangler, a free text editor which includes a built-in diff feature, as well as its big brother BBEdit

Araxis Merge, which looks to be the most advanced (and most expensive) with tons of features, including three way merging and direct diffing of non-plain text documents such as MS Word and PDF.

(1) +1 for Changes. Nice app. Can also be used to sync folders which on a Mac is really difficult otherwise. - Jakob Stoeck
(1) Cool. Didn't know TextWrangler can compare files. - lud0h
(1) I'd also dissuade anyone from buying changes. It had a lot of potential but it is all but abandoned by the company that purchased it. - Jason Tholstrup
(3) BBEdit/TextWrangler's diff tool is crap, hence initiating the search that led me here. It works, but it's not nice. - chaiguy
+1 for letting me know twdiff exists, I like it a lot :) - shams
Changes is great for files on your disk drive but can't do diffs on git branches which might be worth bearing in mind if your files are in git (as most of my code is). - Snow Crash
[+16] [2010-06-30 18:05:41] Peter

p4merge (The Perforce Visual Merge Tool) is a pretty decent graphical diff/merge tool. It comes with the free Perforce client for Mac OSX. It's also a separate application so you don't necessarily need to use it with Perforce.

(1) I detest perforce but p4merge is very handy. You can also use from command line; details here: - Jason Clark
[+13] [2008-10-09 12:40:21] Paul Tomblin

Install gVim [1], use "gvim -d".


(7) on the Mac that'd be macvim, or from the command-line it'd be mvim -d file1 file2 - the Tin Man
(1) It's just "vim" on my Mac. Or /Applications/vim/gvim. - Paul Tomblin
[+13] [2009-12-14 20:59:06] Karl Rosaen

To open Filemerge from the command line, use opendiff, e.g.:

$ opendiff file1.txt file2.txt

[+12] [2010-10-01 23:42:31] jumand

You should consider DeltaWalker. It runs on Mac/Win/Linux. It does file AND folder comparisons, and allows in-line editing.

According to reviews on macupdates, the customer service is great.

It's not freeware, but it seems to be one the clients with the most fully rounded feature sets. It seems very comparable to Araxis Merge or the windows-based product BeyondCompare

(1) Just started playing with it. One big plus - it allowed to diff a .pages and .docx files by reducing them both to text. - Mark Levison
[+11] [2010-02-23 10:12:56] fikovnik

With the FileMerge from XCode as suggested above, one can have a nice integration with SVN from command line:

  1. create a wrapper script say with following content:


    shift 5

    /usr/bin/opendiff "$@"

  2. either either define an alias in bash/sh: alias svndiff="svn diff --diff-cmd <path/to/>" and use it like svndiff -r HEAD <somefile> or modify the SVN settings in ~/.subversion/config the diff-cmd directive and then use it as plain old svn diff

The diff-cmd directive in the subversion config does not seem to eliminate the first 5 parameters that the shift in your script fixes - sweetfa
[+8] [2008-10-17 03:48:27] Davide
(1) But can you get it working without fink? - timoxley
(1) @secoif: don't know, I actually only run Linux on my desktop/laptops since 1999, so happily that I never tried any other OS :-) - Davide
(7) Got any clues about running meld under OSX ? As this question specifically concerned Mac OS.. - LePad
(1) Meld is available through MacPorts. - Richard Povinelli
yes you can get it working without fink -… - Globalkeith
I was happy to see that meld is available through port. But be warned, it installs a bunch of dependencies: - scorpiodawg
[+6] [2009-12-26 07:56:09] weipin
(1) This is actually a pretty decent little tool. It does whole directories and individual files. - Greg Combs
[+6] [2011-01-27 14:43:09] Cesar A. Rivas

TextWrangler [1] has a great diff tool twdiff and it is free. if you find it useful, please consider buying a product of Bare Bones Software [2] and support its development.


twdiff is good, thanks! - Andy
[+6] [2012-02-04 16:14:30] ven

I know this is an old thread, but for the benefit of those stumbling onto this (like me), Wiki has a pretty good matrix comparison of diff tools across all platforms:

[+4] [2008-10-17 03:39:16] Mitch Haile

Someone above posted a link to my differ, RoaringDiff.

The big story for RoaringDiff is that it is intended for invocation from other programs, such as a Perforce or SVN CLI in the Terminal (or an xterm). It is heavily inspired from xxdiff, though not as fancy.

The differ is a front-end over diff(1). Unlike some of the tools such as FileMerge, RoaringDiff is GNU GPLv3; there is a Google Code project, and I'll happily take any patches to make it better. I use the differ everyday; it's not as flexible as it could be, but I do have a lot of miles on the code--there's some bugs that still need to be fixed (they are filed in the Google Code project).

The GUI is written in Objective-C. I still need to port the renderer to Quartz.

[+4] [2010-07-07 09:52:40] NanoPete

hmmmm still nothing comparable to BeyondCompare ( ... which is one of the two reasons to keep a Windows VM ...

(2) Beyond Compare has been the only reason I keep around a VM on my Mac... It ALMOST works under Wine on a Mac, but the icons for some reason are all just squares. It is an excellent multithreaded ftp/sftp/local full directory tree comparison tool. It keeps all comparison sessions, allows filtering etc. And it's really fast. - iJames
(1) It runs well in Wine, but I miss the shell integration. - Danyal Aytekin
Good news everybody! BC is coming to Mac! - aidan
[+2] [2009-12-21 09:47:53] meduz

install tkdiff using MacPorts [1] with:

sudo port install tkdiff

then use it to compare 2 files a.txt and b.txt:

tkdiff a.txt b.txt

it's great and simple. insanely fast, no fuss, lots of shortcuts: qto quit.

when in a svn local copy, you may simply issue


to visualize the difference that you made in your lacal copy on that file.


tkdiff is awesome! but you don't need port anymore. Available natively: - RaytheonLiszt
[+1] [2008-10-09 12:45:06] JeeBee

Eclipse also has a fairly decent comparison mechanism.

i know and use it but what i need now is a simple tool which accepts two pasted texts - user26480
You can still use macvim. Paste one text into an new window. Do a :vnew to split the screen and create a new buffer and paste in the second text. Then, in both windows, do :diffthis. You might need to save the buffers first. - the Tin Man
@user26480 who I assume doesn't exist any more: Try the JDiff plugin in JEdit. - ruffin
Try . You can directly paste 2 texts. Can also compare files. Looks very neat too with pretty colours. - p2pnode
[+1] [2008-10-09 13:51:40] Bryan Oakley

Tkdiff [1] works on the Mac as well as any other platform where Tcl/Tk [2] works. Screenshot [3].


[+1] [2009-10-06 09:56:35] user184880

I had to use Vim [1] because most of diff-s mentioned here do not understand UTF-8 [2].


[+1] [2010-09-22 17:21:20] nibzzz

What about comparing folders? For that I found a free program that isn't based on diff (as far as I know) but does exactly what I was using diff for only better... Compare Folders

I found this stackoverflow post when Googling for diff gui programs. My hope was that I'd find one that 1) would compare directories, 2) given a ton of data would organize the information well, 3) would not crash, 4) would not take forever comparing bits of files when all I needed was filesize and timestamp comparisons, 5) free. Since I didn't find any mention, thought I'd share Compare Folders. It's quicker than most at this kind of high level comparison, and it's free.

(1) This sounds cool, but the link currently brings me to the Mac App Store front page, which is less useful. :) Searching the App Store for "compare folders" yields an app called "Folder Sync," but not anything called "Compare Folders". - dash-tom-bang
Actually, FileMerge does compare folders as well (dragged folders by mistake, was a real surprise) - Erik
[0] [2008-10-09 12:42:34] sepang
[0] [2010-07-07 23:19:54] amok

P4Merge that comes with Perfoce is pretty good and comes for free with perforce client. Both terminal and GUI version.

[0] [2011-02-15 07:56:36] Joe

ECMerge is my preferred merge/diff tool on Mac. I also diff with TextMate sometimes.

I used BeyondCompare with Multi-Edit when they ditched a better diff tool a few years ago. Didn't really like BC. I should not have to edit in a box at the bottom of the window. Stupid.

(1) The current line (3.x) of Beyond Compare offers inline editing. - dash-tom-bang