Knowing how to compare two files on Mac might sound simple at first, but depending on the file type and the reason you're doing it, the tools you need and the results you get can vary wildly.
I've been doing this a lot lately while cleaning out old duplicates, reconciling my endless notes, and tidying up old, cluttered project folders.
If you're looking for the best way to do it, I've tested quite a few options and put together a guide based on my first-hand experience, so let's get started.
Reasons to compare files on a Mac
Actually, there's no shortage of reasons, and trust me, I've been through most of them:
- You've got two versions of a document and no idea which is newer or more complete.
- You suspect duplicate files with slightly different content.
- You're clearing space, and you want to double-check that two files are identical before deleting one.
Next, let's take a look at your options.
How to compare files
I've personally tested each method below on my Mac running macOS Sequoia. Here's what worked and a couple of bonus tips that don't usually make it into tutorials.
1. Use Terminal to compare text files
This one works for text files, scripts, and basic document comparisons. But anything with rich formatting, like PDFs or Word docs, won't work. If you want to compare two text files and want to see what's different between them, line by line, the diff command is one of the fastest tools built right into macOS. No need to install anything. It's a bit old-school, but once you get it, it's surprisingly helpful.
- Put both the files you want to check on your Desktop.
- Open Terminal from Applications > Utilities.
- Type in cd ~/Desktop
- Press Return, then enter the below command, but make sure you change the names of draft1 and draft2 to the exact names of your text files.
diff -y draft1.txt draft2.txt - Next, you'll see a comparison side-by-side. You can also use this command if you only want to see the differences ( change the file names again).
diff -y --suppress-common-lines draft1.txt draft2.txt

2. FileMerge (Part of Xcode Tools)
I discovered FileMerge while digging around Xcode a couple of years ago. It's been a quiet lifesaver. I've been using it to compare project files and even big documents when I don't want to mess around with Terminal.
Here's how it works:
- First, install Xcode (free on the App Store).
- FileMerge lives inside Xcode, but it's pretty hidden. Open Finder, click Go > Go to Folder.
- Paste this exact path:
/Applications/Xcode.app/Contents/Applications/
- Press Return and select FileMerge from the list.
- Now select the left and right, and open the docs you want to compare. Finally, click Compare to see the differences.

It still works great on macOS Sequoia, although the UI hasn't been updated in a while. It's due for a refresh, but it still works.
3. Use BBEdit
If you're comparing two text files, maybe a couple of scripts, documents, or drafts, and you want something easier to read than Terminal, then BBEdit is one of my favorite tools. It's lightweight and has a built-in file comparison feature that's surprisingly powerful.
- Download or open the app.
- Go to the top menu, click File > Open, and select your first File; next, go to Search > Comparison.
- Next to the clock icons, you'll need to select both files and click Compare.
- Then, you'll get a side-by-side view with highlighted differences.
- You can make changes in either file and click Apply to save them.

4. Preview PDFs with a manual eye test
When comparing two PDF files, none of the above tips will help much. Here's my hack:
- Open both files in Preview.
- Drag or resize the windows so they're side by side.
- Run through manually, line by line.

It's not glamorous and a little bit time-consuming, but it is an option.
5. Paid advanced tools
Most Mac users probably don't realize just how many tools there are out there to compare items and files. Here are a couple of paid options that have way more capabilities, including images and data file comparisons.
- Beyond Compare
- Araxis Merge — Comes with a 30-day free trial.

One more way to prep before you compare two files: Mac
If you're sorting through old files trying to decide what to keep or delete, the My Clutter module from CleanMyMac can help you find large, outdated, or duplicate-looking files without even opening them.
I use it before I start comparing, especially when my downloads folder starts to look like a graveyard of ZIPs and drafts.
- Get your free CleanMyMac trial — enjoy unlimited app functionality for 7 days at zero cost.
- Open CleanMyMac and click My Clutter > Scan.
- Click Review All Files.
- Select Duplicates from the sidebar.
- Review each suggestion, select items, and click Remove.

While this doesn't do the file comparison itself, it makes the whole process easier by surfacing the stuff that's most likely to be unnecessary. Plus, CleanMyMac is notarized by Apple and has a long-standing rep for safe macOS cleanup, which matters to me.
Figuring out how to compare two files on Mac isn't just about tools; it's about trust. Trust in the method, trust in your judgment, and trust in the results. Personally, I use a mix of Terminal, FileMerge, and BBEdit, depending on what I'm comparing. For PDFs or visual content, I still fall back on Preview. And when my Mac starts to feel chaotic, I lean on CleanMyMac to help me get back to square one. Comparing files may not be glamorous, but when done right, it gives you clarity. And in 2025, with our Macs more packed with data than ever, that clarity counts.