How to find and delete duplicate photos on iPhone, Mac and Windows

· Heart Photos

A villa on a rocky sea cliff at night under a starry sky, waves breaking below
A villa on a rocky sea cliff at night under a starry sky, waves breaking below · Made by AI

To find and delete duplicate photos: on an iPhone or a Mac, open the Photos app, go to Utilities, then Duplicates, and tap or click Merge; on Windows, run one line of PowerShell that groups files by their SHA-256 hash, which finds exact copies with no extra software. Copies that are not byte for byte the same (a resized version, a JPEG saved again, a screenshot of a photo) need a look-alike check, and the last word should be yours.

The difference between those two kinds of duplicate decides which tool can find them, so it is worth a minute before you delete anything.

What counts as a duplicate photo?

There are two kinds, and most tools only catch one of them.

Kind What it is How it is found
Exact copy The same file twice, perhaps under another name or in another folder A file hash: the same bytes give the same hash
Near copy The same image saved differently: resized, recompressed, converted, slightly cropped A perceptual hash, which compares what the image looks like

A file hash such as SHA-256 changes completely if a single byte of the file changes. Microsoft's documentation for Get-FileHash puts it plainly: if the hash values of two files are identical, so are their contents, and the name of the file plays no part. That makes it perfect for exact copies and blind to everything else.

A perceptual hash works the other way round. The best-known simple one, the difference hash or dHash, was described by Neal Krawetz in "Kind of Like That" (Jan 21, 2013): shrink the image to 9 by 8 gray pixels, then record for each pair of neighbors which one is brighter. That gives 64 bits. Two images are compared by counting the bits that differ. In his post, 0 means the same or a very similar image, 1 to 10 a possible variation, and more than 10 most likely a different image.

How do you merge duplicates on iPhone?

Apple's iPhone User Guide gives these steps, checked on Nov 2, 2026:

  1. Open the Photos app.
  2. Tap Collections.
  3. Tap Utilities, then Duplicates.
  4. Tap Merge on a set of duplicates, then Merge [number] Items.

If you have no duplicates, the Duplicates collection does not appear at all. The feature arrived in iOS 16, where it sat under Albums, and Apple's guide for that version explains what Merge does: it keeps the highest-quality version together with the relevant data from all the copies, and moves the others to Recently Deleted.

How do you merge duplicates on a Mac?

In the Photos app on a Mac, Apple's guide says to click Duplicates under Utilities in the sidebar, select the copies (Command-A selects them all), then click Merge. If you use an iCloud Shared Photo Library, choose Both Libraries first so the copies in each are compared. Photos needs time to analyze a large library, so a missing Duplicates item may just mean it has not finished.

The merged copies go to Recently Deleted, where you can get them back for 30 days. They still take up space until that time passes or you delete them there for good, so if you merged to free up storage, that is the second step.

How do you find duplicate photos on Windows?

PowerShell comes with Windows and can find exact copies in a folder and every folder inside it. Open PowerShell in your photo folder and run:

Get-ChildItem -Recurse -File | Get-FileHash | Group-Object Hash | Where-Object Count -gt 1 | ForEach-Object { $_.Group.Path; "" }

It prints each set of identical files together, with a blank line between sets. It deletes nothing, so you choose which copy to keep. We ran it on Nov 2, 2026 in Windows PowerShell 5.1 on a folder with a copy of one image under another name, and it listed the two files as a set. Get-FileHash uses SHA-256 unless told otherwise, according to its documentation.

For near copies on Windows, macOS or Linux, the free, open-source Czkawka finds duplicates by name, size or hash, and similar images that differ in resolution or carry a watermark. Its newer interface is called Krokiet. As with any tool, look at each group before you delete.

Which copies does each method actually catch?

We measured it. We took one public image from Heart Photos (the one at the top of this post, 1280 by 720), made the usual kinds of copy with Pillow 12.1.1 and cwebp, and compared each one with the original by SHA-256 and by a 64-bit difference hash made the way Krawetz describes.

The copy Same SHA-256? dHash bits different
The same file, renamed Yes 0
Saved as JPEG, quality 90 No 0
Saved as JPEG, quality 60 No 3
Saved as WebP, quality 75 No 2
Resized to half the width No 1
5% cropped off every edge No 10
The same scene, edited from day to night No 35
A different image (a villa with a pool) No 28

Three things stand out:

  • A file hash only catches the renamed copy. Every other copy is, to SHA-256, a different file, even the JPEG with no difference you could see.
  • A difference hash catches resaves and resizes easily, at 0 to 3 bits. A crop is harder: 5% off each edge already reached 10 bits, right at the edge of Krawetz's "possible variation".
  • An edit is not a duplicate to either method. The night version of a day photo scored 35 bits, further from it than an unrelated image of a villa was. If you keep edits next to originals, no automatic tool will merge them for you, which is usually what you want.

One image is a small sample, so read the table as an illustration of how the methods behave, not as limits that hold for every photo.

Frequently asked questions

Does merging duplicates on iPhone lose quality?

According to Apple's iOS 16 guide, no: merging keeps the highest-quality version and the relevant data from all of the copies.

Why does my iPhone not show a Duplicates album?

Apple says the collection only appears when your library has duplicates. On a Mac, Apple notes that Photos takes time to analyze a large library, so it may simply not be done yet.

Is it safe to delete duplicates automatically?

For exact copies found by a file hash, yes, because the files are identical by definition; just keep one. For look-alikes, check them yourself: a burst of nearly identical shots or two edits of one photo can look like duplicates to software and still be worth keeping.

Why did converting my photos create duplicates?

Converting writes a new file, so a HEIC and the JPEG made from it are two files with different bytes and both stay in the folder. Our guide on converting HEIC to JPEG explains why it is still worth keeping the original.

Does deleting a duplicate free up space right away?

Not in Apple Photos: the copies wait in Recently Deleted for 30 days unless you delete them there. Heart Photos has a Trash too, which keeps a deleted photo until you empty it: a safety net worth having.

What Heart Photos does about duplicates

Heart Photos checks both kinds of duplicate when you upload, and never deletes anything on its own:

  • The same file is never stored twice. Before uploading, the page works out the SHA-256 of the file in your browser and asks your library whether it already has it. If it does, nothing is sent again and the upload says "Already had it".
  • A look-alike is uploaded, and you are told. Heart Photos also compares a 64-bit difference hash and a finer look at the image. A near copy is never refused: the upload goes in and shows a Similar link that opens it next to the photos it resembles.
  • All your look-alikes in one place. The Look-alikes gallery groups your photos that look like each other. If the software got one wrong, the x on a photo's Look-alikes says "Not a look-alike", and it stops being grouped with them.
  • Deleting goes to the Trash. You can restore a photo from there, and nothing empties it but you.

Your photos are only compared with your own library and with public photos, never with other people's private ones. And because the original you upload is kept, as our post on AVIF, JPEG XL and WebP explains, the copy you keep is the real one.

To try it with your own library, open Heart Photos and upload your photos; any you already have will say so.

More from the blog