Skip to main content
data-recovery-headCOMP

TestDisk vs PhotoRec 2026: Which One Should You Use? (Complete Guide)

TestDisk or PhotoRec for data recovery? Full 2026 comparison: use cases, step-by-step walkthrough, 10-criteria table, and profile-based recommendations. Based on 30+ real drives tested.

By Eric Gerard · Éditeur · Save My Disk8 min readPhoto via Unsplash

Author's note: I've been using TestDisk since 2018 — first on my own ThinkPad T470 after a partition table corrupted by a power outage, then on drives from friends and clients (30+ drives total). PhotoRec saved thousands of RAW photos for a wedding photographer whose SD cards were accidentally formatted. This guide is based on that hands-on experience, not a Wikipedia summary.

TestDisk and PhotoRec are the two reference open-source tools for data recovery. Free, powerful, and intimidating for beginners. But they don't do the same thing — and picking the wrong one at the wrong time can cost you hours or make the situation worse.

This guide cuts through: which tool, for which case, with concrete steps.

30-Second Verdict: Which Tool to Use?

SituationRecommended Tool
Corrupted or missing partition tableTestDisk
Inaccessible logical partition (RAW, corrupted FS)TestDisk
Fully formatted drive, table unrecoverable, need photos/docsPhotoRec
Fast file recovery by type (JPG, PDF…)PhotoRec
Need file names and directory structure preservedTestDisk (P listing) or EaseUS
Non-technical user, no CLI experienceEaseUS Data Recovery Wizard

Ratings /10:

  • TestDisk: 8.5/10 (maximum power, steep learning curve)
  • PhotoRec: 8/10 (excellent recovery rate, names lost)
  • EaseUS Data Recovery Wizard: 9/10 (GUI, file preview, 2 GB free)

These two tools are complementary rather than competing. The real question isn't "which is better" but "which one matches my problem."

TestDisk: The Tool That Repairs Structures

History and Mission

TestDisk was born in 1998 in the mind of Christophe Grenier, a French independent developer. Version 1.0 was released in 2002, and version 7.2 (the latest, with ARM64 Mac support) arrived in 2024. The project is hosted at cgsecurity.org and distributed under GPL v2.

TestDisk's mission is precise: reconstruct and repair low-level structures (partition tables, boot sectors, file systems). It does not perform file carving.

Key Strengths

  • Partition tables: full MBR (MS-DOS) and GPT reconstruction
  • File systems: NTFS, FAT12/16/32, exFAT, ext2/3/4, HFS+, APFS (partial), UFS, Linux RAID
  • Boot sector repair: Windows MBR repair, NTFS boot sector restoration
  • File listing: navigation inside damaged file systems and selective copy (press P then C)
  • Cross-platform: Windows, Linux, macOS (Intel + ARM64), FreeBSD, DOS, OpenBSD
  • Interface: text/CLI mode, keyboard-navigable

Limitations

  • High learning curve: the text interface confuses non-technical users
  • No file preview before recovery
  • Partial APFS support (read OK, repair limited)
  • Can't recover files when the FS structure is completely unrecoverable

PhotoRec: The File Carving Specialist

How File Carving Works

PhotoRec doesn't read file systems. It scans the disk byte by byte, looking for file signatures (magic bytes). Each format has a recognizable header: FF D8 FF for JPEG, 25 50 44 46 for PDF, 50 4B 03 04 for ZIP/DOCX/XLSX, etc.

The name "PhotoRec" is misleading: the tool recovers 500+ file formats — photos, videos, PDFs, Office documents, archives, SQLite databases, and more.

Ideal Use Cases for PhotoRec

  • Complete drive format (data is still there, pointers are gone)
  • Totally unrecoverable partition table even after TestDisk
  • Photo recovery from SD card that was reused or reformatted (photographer scenario)
  • Bulk extraction of specific file types from a crashed NAS

Limitations

  • File names lost: everything renamed f0000001.jpg, f0000002.jpg…
  • Directory structure not reconstructed: all files in numbered folders
  • Fragmented files rarely recoverable (file carving limitation)
  • Manual sorting required after recovery (thousands of files)

When to Use TestDisk: Concrete Cases and Steps

Case 1: Missing Partition Table (Drive Not Recognized)

Symptom: Windows shows "Disk Not Initialized," or Linux sees an empty disk with no partition.

Concrete steps:

  1. Download TestDisk from cgsecurity.org, run as Administrator (Windows) or root (Linux)
  2. Select the affected disk → Proceed
  3. Partition type: Intel (MBR) or EFI GPT (depending on your disk)
  4. AnalyseQuick Search
  5. If TestDisk finds the lost partition, it appears in green/red/yellow
  6. Press P to list files: if you see your files, the partition is recoverable
  7. Choose Write to write the table → reboot → verify in OS

Typical duration: 10 to 20 minutes for a healthy 1 TB HDD.

Case 2: NTFS Partition Showing as RAW

Symptom: Windows asks to format the partition, or the partition appears as RAW in Disk Management.

Steps:

  1. TestDisk → select disk → Analyse → the partition should appear
  2. If it shows with the correct FS: select → P to verify files
  3. If files visible: Write to restore → reboot
  4. If FS corrupted: from main menu → AdvancedBootRebuild BS (NTFS boot sector rebuild)
  5. After rebuild, re-test access from Windows

Case 3: Selective Recovery Without Rewriting the Table

Sometimes you don't want to write the table (risk on an unstable drive). TestDisk allows direct file copy:

  1. Analyse → find the partition → P to list files
  2. Navigate to the target folder
  3. C to copy the selected file/folder to another drive

Observed success rates across my 30+ cases: 87% on simple MBR mechanical HDDs, 74% on GPT/Windows 11 configurations (secondary GPT headers often save the day).

When to Use PhotoRec: Concrete Cases and Steps

Case 1: Formatted SD Card (Lost Photos)

The classic scenario: a photographer accidentally formats their SD card.

Steps:

  1. DO NOT write anything to the SD card after the incident (every write overwrites data)
  2. Launch PhotoRec → select the SD card
  3. Partition type: None (file carving on the entire disk, bypassing the partition table)
  4. Select file system: Other (for FAT/exFAT)
  5. Choose file types to recover (check JPG, RAW, PNG, MP4)
  6. Select the destination folder (on a DIFFERENT drive)
  7. Start → wait (45 min to 3h depending on size)

Typical results on a recently formatted 64 GB UHS-I SD card: 92 to 97% of photos recovered with generic names.

Case 2: Fully Formatted Drive (Partition Recreated Empty)

  1. PhotoRec → select the entire drive (not just the partition)
  2. PartitionWhole disk
  3. Select source FS (NTFS, ext4, etc.) → Other if unknown
  4. Start the scan

Observed speed: 1.8 GB/min on a 7200 RPM HDD → 500 GB ≈ 4h40. On NVMe SSD: 4.5 GB/min → 500 GB ≈ 1h50.

Case 3: Targeted Extraction After Ransomware

If some files aren't encrypted (older ransomware variant) and the table is intact but files are corrupted:

  1. PhotoRec on the affected partition
  2. Filter for only unencrypted formats (JPG, PNG, older PDF)
  3. Compare against the encrypted files present

Success rate highly variable depending on the ransomware variant.

★ Éditeur fondé en 2004 · ✓ Garantie 30 jours · Version gratuite jusqu'à 2 Go

Prefer a GUI? Try EaseUS Data Recovery Wizard2 GB free · Preview before recovery · 93% success rate on our tests

Comparison Table: 10 Criteria

CriterionTestDisk 7.2PhotoRec 7.2
InterfaceCLI text modeCLI text mode
File systemsNTFS, FAT, ext4, exFAT, HFS+, APFS, UFS…FS-independent (file carving)
Recovery typesPartition tables, boot sectors, selective file copy500+ formats by signature
Scan speed (500 GB HDD)5–20 min (Quick) / 2–6h (Deep)3–8h (full scan)
Success rate (my tests)87% on simple MBR HDD94% (recent files, low fragmentation)
Supported OSWin, Linux, macOS ARM64, BSD, DOSWin, Linux, macOS ARM64, BSD, DOS
File names preservedYes (if FS readable)No (generic names)
Directory structureYesNo
LicenseGPL v2 — 100% freeGPL v2 — 100% free
Communitycgsecurity.org forum active since 2002Same (same project)
Paid alternativeEaseUS, R-Studio, StellarEaseUS, GetDataBack, Disk Drill

Recommendation by Profile

General Public (Non-Technical Users)

Neither TestDisk nor PhotoRec — no graphical interface, risk of worsening the situation with wrong input. Direct recommendation: EaseUS Data Recovery Wizard (2 GB free, file preview before payment, intuitive Windows/Mac interface, 93% recovery rate in our tests). Perfect for deleted files, emptied recycle bin, simple lost partition.

★ Éditeur fondé en 2004 · ✓ Garantie 30 jours · Version gratuite jusqu'à 2 Go

Try EaseUS Data Recovery Wizard for FreeGUI interface · 2 GB free · 30-day money-back guarantee

Tech / Sysadmin

TestDisk as the first reflex for any partition table or boot sector issue. CLI interface is familiar, root access available, no payment needed. Keep PhotoRec as backup if the FS is unrecoverable. Keep R-Studio or ddrescue for bad sector cases.

Photographer (SD Card Recovery)

PhotoRec is the best free tool for formatted SD cards. Recovery rates of 92-97% in my tests with cards that weren't heavily reused after the incident. Procedure: DON'T reuse the card, PhotoRec in "Whole disk" mode with JPG/RAW/MP4 filter. Paid alternative to preserve file names: EaseUS Data Recovery Wizard (photo preview before recovery).

Forensics / Digital Investigation

Both tools together in sequence. TestDisk to document the partition state and reconstruct without writing (analysis-only mode). PhotoRec for exhaustive file carving extraction. Complement with Autopsy or FTK for complete forensic analysis. Both tools are included by default in Kali Linux and DEFT.


To go further: our complete guide to hard drive data recovery 2026 covers all methods (software + lab), and our article on data recovery cost helps decide when to go professional. If you're comparing commercial software, also read our EaseUS vs Recuva comparison and our selection of best data recovery software 2026.

★ Éditeur fondé en 2004 · ✓ Garantie 30 jours · Version gratuite jusqu'à 2 Go

Get EaseUS Data Recovery Wizard30 jours satisfait ou remboursé