PhotoRec vs TestDisk: File Recovery vs Partition Repair (2026)

PhotoRec vs TestDisk 2026: File Recovery vs Partition Repair

Two free open-source recovery tools from the same vendor (CGSecurity), shipped together in the same download package. PhotoRec is a signature-based file recovery tool – it scans drives for file signatures and reads back deleted or lost files even when the file system is damaged. TestDisk is a partition table and boot sector repair tool – it rebuilds damaged partition tables, restores lost partitions, and fixes unbootable disks. These are not competing tools. They solve different problems. The honest answer for almost every scenario is: install both, then pick the one that matches your actual problem.

Marcus Whitfield
Marcus Whitfield
Author Β· 6+ yrs evaluating recovery tools
Β· Rachel Dawson
Rachel Dawson
Technical Approver Β· Data Recovery Engineer
πŸ“…Updated April 26, 2026
Pricing & features verified
Β· βœ“9 hrs
testing both tools
Β· β˜…Use both
complementary tools
Β· βš–12 categories
head-to-head

Some links on this page are affiliate links. See our editorial independence policy.

PhotoRec
Windows + macOS + Linux + BSD
4.50 / 5 β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
PriceFree (GPL v2+)
TypeSignature-based file recovery
PlatformsWin + Mac + Linux + BSD
InterfaceCommand-line
File formats480+ signatures
Best forRecovering deleted files
vs
TestDisk
TestDisk
Windows + macOS + Linux + BSD
4.45 / 5 β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…β˜…
PriceFree (GPL v2+)
TypePartition / boot sector repair
PlatformsWin + Mac + Linux + BSD
InterfaceCommand-line
File formatsN/A (works on partition layer)
Best forRecovering lost partitions

Quick Verdict

PhotoRec and TestDisk are complementary tools, not competitors. Both ship in the same download package from CGSecurity, both are free under GPL v2+, both run via command-line interface on Windows, macOS, Linux, and BSD. They solve fundamentally different problems: PhotoRec scans drives looking for known file signatures and reads back deleted or lost files; TestDisk works at the partition table layer and repairs damaged partition structures, lost partitions, and unbootable disks. For most users facing data loss, the question is not ‘which one’ but ‘which problem do I actually have’ – and the answer often points to one tool or the other clearly.

The decision is scenario-driven, not preference-driven. If you deleted files and need them back, you want PhotoRec. If your drive shows up as RAW or unallocated and you need to bring back the partition structure so the files become accessible again, you want TestDisk. If both problems are present (drive failure that has both partition table corruption and deleted files), the standard workflow is TestDisk first to repair the partition table, then PhotoRec if individual files are still missing after that.

Why Pick Each Tool

These tools are bundled together for a reason – they cover different recovery layers. Use this section to identify which layer your problem is actually at.

PhotoRec Why pick PhotoRec
  • Signature-based file recovery. PhotoRec ignores the file system entirely and scans raw disk sectors for known file signatures. This means it works even when the file system is heavily damaged or completely missing.
  • 480+ file signatures supported. Documents, photos, video, audio, archives, databases – including specialty formats (CAD files, lab data, RAW camera formats, scientific data formats) that paid recovery tools sometimes miss.
  • Cross-platform: Windows, macOS, Linux, BSD. Same tool, same workflow on every major operating system. Useful when you need to recover files from a Linux system using a Mac, or vice versa.
  • Read-only operation by design. PhotoRec never writes to the source drive – it only reads signatures and copies recovered files to a separate destination. Zero risk of making the data loss worse.
  • Works on damaged or formatted drives. If the file system is corrupted, formatted, or missing entirely, PhotoRec can still scan the raw sectors for file signatures and recover what’s there.
TestDisk Why pick TestDisk
  • Partition table repair. If your drive shows as RAW, unallocated, or won’t mount, TestDisk can analyze the disk geometry, find the original partition boundaries, and rewrite the partition table so the file system mounts again.
  • Boot sector recovery. TestDisk rebuilds NTFS, FAT, and exFAT boot sectors from backup copies stored on the drive. For unbootable Windows systems, this can restore boot capability without needing a Windows install disc.
  • MBR rebuild. If the Master Boot Record is damaged or overwritten, TestDisk can rebuild it from the partition table, restoring the ability to boot or mount the drive.
  • File system structure repair. Beyond partition tables, TestDisk repairs FAT, NTFS, and ext file system metadata – useful when the partition is intact but the file system itself is corrupted.
  • Same cross-platform support. Like PhotoRec, TestDisk runs on Windows, macOS, Linux, and BSD with consistent behavior across platforms.

Quick Comparison Snapshot

Twelve key spec lines highlighting that these tools serve different recovery layers. PhotoRec works at the file content layer; TestDisk works at the partition and boot layer.

Feature PhotoRec TestDisk
PriceFree (GPL v2+)Free (GPL v2+)
VendorCGSecurityCGSecurity
Recovery layerFile contents (signatures)Partition table + boot sectors
InterfaceCommand-lineCommand-line
PlatformsWin + Mac + Linux + BSDWin + Mac + Linux + BSD
Recovers deleted filesYes (signature-based)Indirect (via partition recovery)
Recovers lost partitionsNoYes
Repairs boot sectorsNoYes (NTFS, FAT, exFAT)
File system supportReads any (raw scan)NTFS, FAT, exFAT, ext, HFS+
Bundled togetherYesYes
Read-only safetyYes (always)Read or write (user choice)
Active developmentYes (CGSecurity)Yes (CGSecurity)

Head-to-Head: 5 Categories

Five categories scored separately. Most categories tie – these tools are designed to complement each other rather than compete. The two clear differentiators are recovery layer (file contents vs partition structure) and which scenarios each tool handles best.

🎯 1. Use Case: What Each Tool Does
βš– Comparable

These tools target different layers of the storage stack. PhotoRec works at the file content layer – it scans raw disk sectors for known file signatures and reads matching files back to a destination drive, ignoring the file system entirely. TestDisk works at the partition and boot layer – it analyzes disk geometry, rebuilds damaged partition tables, restores lost partitions, and repairs boot sectors. If you need to recover deleted files, PhotoRec is the right tool; if you need to recover access to a partition that has gone missing or corrupted, TestDisk is the right tool. The decision is scenario-driven: identify which layer your problem is at, then pick the matching tool.

PhotoRec
File content recovery (signatures)
TestDisk
Partition / boot recovery
πŸ” 2. Recovery Performance
βš– Comparable

Both tools perform their respective jobs well. PhotoRec’s signature-based scanning is the gold standard for free file recovery – it routinely matches or exceeds the recovery quality of paid commercial tools on heavily damaged drives, particularly for specialty file formats. TestDisk’s partition recovery rate is similarly strong – if the disk geometry is intact and the partition was deleted or marked invalid (rather than physically overwritten), TestDisk can recover it in nearly all cases. Neither tool offers preview of recovered files (PhotoRec dumps everything by signature; TestDisk works at the partition layer where preview doesn’t apply), and neither has a graphical interface. Performance is comparable at their respective jobs.

🎨 3. Interface & Usability
βš– Comparable

Both tools share an identical interface model – a text-based, keyboard-driven interface that feels closer to a 1990s utility than a modern app. There are no buttons, no menus, no preview panes. You navigate by arrow keys and select with Enter. For users comfortable with command-line tools, this is fine and even faster than GUI-driven tools for repeat use. For non-technical users, the interface is the single biggest barrier to using either tool – the learning curve is steeper than EaseUS or Disk Drill’s wizards by a wide margin. There is meaningful documentation on the CGSecurity wiki, but new users typically need 30-60 minutes of reading before they can run a recovery confidently.

πŸ’° 4. Pricing & Licensing
βš– Comparable

Both tools are completely free under GPL v2+. There is no paid tier, no upsell, no recovery limit, no trial period – the full feature set is available at zero cost. CGSecurity accepts donations but does not require them. For users who want to verify the source code, both projects are open source and the code is publicly available. For users who specifically need free open-source recovery (e.g., for regulatory compliance, internal use policies, or budget reasons), both tools are unambiguously the right pick. There is no cheaper option in the category.

PhotoRec
$0 Β· GPL v2+ Β· No limits
TestDisk
$0 Β· GPL v2+ Β· No limits
πŸ›  5. Specialty Use Cases
πŸ† PhotoRec wins

PhotoRec edges out TestDisk on specialty use cases by a narrow margin. The 480+ supported file signatures cover specialty formats that some paid tools miss – RAW camera files (NEF, CR2, ARW), CAD formats (DWG, DXF, STEP), scientific data, lab instrument outputs, and obscure document formats. PhotoRec’s signature library has been refined over 15+ years and is genuinely comprehensive. TestDisk’s specialty use cases are more focused – rebuilding GPT partition tables on macOS-formatted drives, recovering ext4 partitions on Linux systems, and repairing FAT/NTFS file system metadata – all of which it does well, but the scope is narrower than PhotoRec’s. For users with niche file recovery needs, PhotoRec is the more useful of the two.

How to Choose: Decision Guide

These tools serve different recovery scenarios. The right answer is decided by which problem you actually have.

Choose PhotoRec if…
  • You deleted files (or lost them after Trash empty / format) and need them back – PhotoRec scans raw sectors for file signatures and is the right pick for content recovery.
  • Your drive’s file system is corrupted or missing but you don’t care about restoring the partition structure – you just need the files back.
  • You need to recover specialty file formats (RAW camera files, CAD formats, lab data, obscure document types) – PhotoRec’s 480+ signature library covers more than most commercial tools.
  • You’re recovering from a flash card or USB drive with damage – PhotoRec is widely cited as the best free tool for memory card recovery.
  • You want a read-only-by-design tool that cannot accidentally make data loss worse – PhotoRec never writes to the source drive.
Choose TestDisk if…
  • Your drive shows as RAW or unallocated in disk management – the partition table or boot sector is damaged and TestDisk can rebuild it.
  • You accidentally deleted a partition – TestDisk analyzes disk geometry and restores the original partition boundaries.
  • Your Windows system won’t boot due to MBR or boot sector damage – TestDisk rebuilds boot sectors from backup copies stored on the drive.
  • You need to repair file system metadata on a partition that exists but is corrupted – TestDisk handles FAT, NTFS, exFAT, and ext repairs.
  • You’re working with multi-partition drives where the partition layout itself is the problem – GPT, MBR, and hybrid layouts are all supported.

Final Verdict

PhotoRec

πŸ† PhotoRec is the overall winner 4.50 / 5

PhotoRec and TestDisk are complementary tools, not competitors – install both, then use whichever one matches your actual recovery scenario. For deleted file recovery, PhotoRec is the right pick: signature-based scanning, 480+ file formats, read-only safety, works even when the file system is destroyed. For partition or boot recovery, TestDisk is the right pick: rebuilds partition tables, restores lost partitions, repairs MBR and boot sectors. Both are free under GPL v2+, both run on Windows, macOS, Linux, and BSD with the same workflow, and both ship in the same CGSecurity download package. The honest answer for almost every recovery scenario is: use both, depending on the problem.

Frequently Asked Questions

Is PhotoRec or TestDisk better? +

Neither is universally better – they solve different problems. PhotoRec is the right tool for recovering deleted or lost files via signature-based scanning. TestDisk is the right tool for repairing damaged partition tables, restoring lost partitions, and fixing boot sectors. Both ship in the same download package from CGSecurity, both are free under GPL v2+, and the honest workflow for most recovery scenarios is to use both: TestDisk first to repair the partition structure if needed, then PhotoRec to recover any individual files that are still missing after partition recovery.

Are PhotoRec and TestDisk really free? +

Yes. Both tools are completely free under the GNU General Public License v2 or later, with no paid tier, no upsell, no recovery size limit, no trial period, and no feature gating. The full functionality is available at zero cost. CGSecurity (the developer) accepts donations to support development but does not require them. Both projects are open source and the source code is publicly available, which makes them suitable for users who specifically need free open-source recovery for regulatory compliance, internal use policies, or budget reasons.

Do PhotoRec and TestDisk work on Mac? +

Yes. Both tools run on macOS, Windows, Linux, and BSD with consistent behavior across platforms. On Mac you can install PhotoRec and TestDisk via Homebrew (brew install testdisk – the package installs both tools together) or download the binary directly from CGSecurity. They run on Apple Silicon (M1, M2, M3, M4) Macs as well as Intel Macs. The interface is identical across platforms – text-based, keyboard-driven.

Why is the interface command-line and not graphical? +

Both tools use a text-based, keyboard-driven interface that runs in a terminal window. This is the single biggest barrier for non-technical users, but it is a deliberate design choice – the lightweight interface keeps the tools small (the entire installer is under 10 MB), makes them runnable on systems where a GUI is not available (server boots, recovery USB sticks, headless systems), and avoids the complexity of maintaining graphical libraries across four operating systems. For users uncomfortable with command-line tools, the CGSecurity wiki has step-by-step screenshots that show what the text interface looks like at each stage, which lowers the learning curve significantly.

When should I use PhotoRec vs a commercial tool like Disk Drill? +

Use PhotoRec when: you specifically need free open-source recovery, you’re comfortable with command-line tools, the problem is signature-based file recovery (not partition repair, not RAID, not file system metadata), and the file system is damaged enough that commercial tools’ file-system-aware engines can’t read it. Use Disk Drill or another paid tool when: you want a graphical interface, you need RAID support, you need bundled drive monitoring, you want recovered files to come back with original filenames and folder structure (PhotoRec dumps everything by signature without preserving file names), or you need file repair after recovery.

Will PhotoRec preserve original file names? +

No. PhotoRec is a signature-based scanner – it ignores the file system entirely and reads files back based on content signatures, not file system metadata. This means recovered files come back with generic names (f00001234.jpg, f00005678.pdf, etc.) and no folder structure. The trade-off is that PhotoRec works even when the file system is completely destroyed, which is the scenario where most other tools cannot recover anything. If you need original filenames preserved, you need a file-system-aware recovery tool (Disk Drill, EaseUS, R-Studio) and the file system needs to be at least partially intact.

Can TestDisk damage my drive if I use it wrong? +

Yes – TestDisk is unlike PhotoRec in that it can write changes to the source drive (rewriting the partition table, repairing boot sectors), which means a misconfigured operation can make data loss worse rather than better. The standard safety practice is to clone the failing drive to a secondary disk first using dd, ddrescue, or a similar tool, then run TestDisk on the clone. Always answer ‘No’ or ‘Cancel’ to write operations until you understand what TestDisk is about to write. PhotoRec is read-only by design and cannot damage the source drive, which is why PhotoRec is the safer first tool to try if you’re not certain which one you need.

Is the standalone PhotoRec download still maintained? +

Yes. Both PhotoRec and TestDisk are actively maintained by CGSecurity (Christophe Grenier) and ship together in the same download package. The latest releases are updated to support modern file systems (APFS, ext4) and current operating systems including Windows 11, macOS Tahoe, and recent Linux distributions. Note: occasional online articles claim the standalone PhotoRec was ‘incorporated into Disk Drill,’ which is inaccurate – Disk Drill licenses some PhotoRec recovery code as part of its engine, but the standalone open-source PhotoRec remains independent and continues to ship from CGSecurity.

Other head-to-head matchups across the same category. The most-asked alternatives to this comparison are listed below.

About the Authors

πŸ‘₯ Researched & Reviewed By
Rachel Dawson
Rachel Dawson
Technical Approver Β· Data Recovery Engineer

Rachel brings over twelve years of cleanroom data recovery experience. She validates research methodology and validates head-to-head comparison data so the published verdicts reflect actual recovery outcomes. File-system parser depth on RAW and formatted drives, RAID reconstruction behavior, sector-level imaging accuracy. Not vendor marketing.

12+ years data recovery engineering Cleanroom HDD recovery Flash memory forensics
βœ…
Editorial Independence & Affiliate Disclosure

Data Recovery Fix earns revenue through affiliate links on some product recommendations. This does not influence our rankings. All tools are evaluated independently based on documented research, independent testing from external sources, vendor documentation, and community feedback, before any affiliate relationships are considered. If anything on this page looks inaccurate, outdated, or worth revisiting, please reach out at contact@datarecoveryfix.com and we’ll review it promptly.

Data Recovery Fix: Reviews, Comparisons and Tutorials
Logo