Diff Tools

28 Best Free and Open Source Terminal-Based Diff Tools

File comparison compares the contents of computer files, finding their common contents and their differences. The result of the comparison is often known as a diff.

diff is also the name of a famous console based file comparison utility that outputs the differences between two files. The diff utility was developed in the early 1970s on the Unix operating system.

Typically, diff is used to show the changes between two versions of the same file. Modern implementations also support binary files.

Command-Line InterfaceConsole-based applications are light on system resources (very useful on low specified machines), are often faster and more efficient than their graphical counterparts, they do not stop working when X is restarted, and are perfect for scripting purposes.

When designed well, console-based applications offer a surprisingly improvement in productivity. The applications are leaner, faster, easier to maintain, and remove the need to install a whole raft of libraries.

To provide an insight into the quality of software that is available, we have compiled a list of 28 useful terminal-based diff tools. Graphical diff tools are covered in a separate Group Test. We make the following recommendations. A good range of tools are available. They are all free and open source goodness.

Ratings chart

Now let’s scrutinize the 28 tools at hand. For each utility we have compiled its own portal page, a full description with an in-depth analysis of its features, screenshots, together with links to relevant resources.

Terminal-Based Diff Tools
difftasticStructural diff tool that compares files based on their syntax
hunkTerminal diff viewer with syntax highlighting and side-by-side views
diff-so-fancyAttractive diffs with diff-highlight and more
deltaViewer for git and diff output
icdiffAn improved colored diff
diffoscopeIn-depth comparison of files, archives, and directories
colordiffWrapper for diff with pretty syntax highlighting
diffsitterSemantic diff tool
objdiffLocal diffing tool for decompilation project
ydiffTool to view colored, incremental diff in a version controlled workspace
diffrWord-by-word diff highlighting utility
dyffdiff tool for YAML files
WdiffWordwise implementation of diff
dwdiffdiff program that operates at the word level
diffymlCompares YAML documents by their structure
oyoStep-through diff viewer
diff2html-cliGenerate HTML diffs
biodiffTerminal-based binary diff viewer
dirdiffCompute the differences between two directories
csvdiffFast diff tool for comparing CSV files
VBinDiffVisual binary diff
riffWrapper around diff
csv-diffDiffing CSV and JSON files
xmldiffCompare XML documents
PatdiffFile diff using the Patience Diff algorithm
dead-ringerBinary diff utility
sesdiffGenerates a shortest edit script
semdiffSemantic diff tool written in Rust
Have we missed any open source alternatives to diff? Please let us know!
0
Alternatives to diff?x

All the CLI tools in this series.

Alternatives to CLI tools
age // awk // bc // cal // cat // cd // chmod // cksum // cloc // cmp // compress // cp // cron // curl // cut // date // dd // df // diff // dig // du // fdisk // file // find // free // ftp // grep // gzip // hexdump // history // jq // kill // less // locate // ls // lsof // make // man // more // mv / ping // ps // psql // rename // rm // sed // split // ssh // stow // strings // sudo // sysctl // tail // talk // tar // telnet // time // top // touch // traceroute // tree // uname // uniq // uptime // vi // watch // Wget // who // whois // xargs

Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
8 Comments
Oldest
Newest Most Voted
Al Jay
Al Jay
1 year ago

You forgot mcdiff, part of midnight commander. It’s the only diff tool I use.
Also, where I work, it’s the only one available as part of midnight commander, which is usually available everywhere.

Last edited 1 year ago by Al Jay
Des
Des
1 year ago
Reply to  Al Jay

Where I work midnight commander isn’t installed. And if you’re talking about that you can install it, so can all the others…

Al Jay
Al Jay
1 year ago
Reply to  Des

My organization doesn’t allow import of any of the others.

BobsYourUncle
BobsYourUncle
5 months ago

Literally thought about this today and found out this was created/updated yesterday 🙌🏾. Great content as always and just donated