Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
File carving recovers files from raw data by recognising their internal structure, ignoring the file system entirely. It is how deleted documents and images are retrieved when the metadata is gone.

What Is File Carving?
File carving recovers data by looking for the shape of files rather than for entries in a directory. A JPEG begins with a recognisable two-byte marker and ends with another; a PDF starts with a version string and ends with an end-of-file marker; a ZIP archive has a local file header and a central directory. A carving tool scans a disk image byte by byte, finds those patterns, and extracts whatever lies between them — without ever consulting the file system.
Deleting a file usually removes the metadata record that points to its content while leaving the content in place. If the record survives, standard recovery is simpler and more accurate because you get the filename, the path, and the timestamps. Carving is what you do when that record is gone: after a format or a partition table rebuild, on a corrupted volume, in the unallocated space of a disk that has been in use for years, inside a memory dump or a page file, or in network capture data.
It also reaches places a file system view cannot. File slack — the space between the end of a file and the end of its last cluster — routinely holds fragments of whatever occupied the cluster before, and hibernation files, swap, and volume shadow copies all contain recoverable structures.
PhotoRec is the pragmatic default, recognising several hundred formats and handling fragmentation reasonably. Scalpel and Foremost carve from configurable signature databases and are easy to script. bulk_extractor takes a different approach, scanning for feature types such as email addresses, card numbers, URLs, and JSON fragments rather than whole files, which is frequently more useful in an intrusion investigation than recovering the files themselves. Autopsy and the commercial suites include carving modules that integrate results with the rest of the case.
Carved output is unreliable in specific, predictable ways, and the report has to say so. There is no filename, no original path, and no timestamp, because all of that lived in the metadata you no longer have. Fragmentation produces files that open but contain content from two sources. False positives are common, since a signature can occur by chance inside unrelated data. Encrypted and compressed content carves as noise. On solid-state drives, TRIM and garbage collection may have zeroed the blocks long before you arrived, so a carve that returns little is not evidence that nothing was deleted.
Validate rather than assume. Open or parse every file that matters, check internal metadata such as EXIF against the claimed content, and hash the results. Where a carved document is central to a case, corroborate it with something that does carry context — a shortcut file, a jump list entry, an email attachment record, or a surviving master file table entry that names the same content.
Carving is also a data protection consideration in corporate work: scanning unallocated space surfaces material unrelated to the investigation, including personal data belonging to other employees. Scope the exercise, document the lawful basis, and dispose of what you do not need. Our digital forensics services apply those boundaries before the first scan rather than after it.
File recovery uses surviving file system metadata, so it returns the original name, path, and timestamps. Carving ignores the file system and reconstructs files purely from their internal signatures and structure, which works when the metadata is gone but returns content without context. Try metadata-based recovery first, then carve the unallocated space for what it missed.
Usually fragmentation. Carving assumes a file occupies contiguous sectors, so if the operating system split it across the disk the extracted data contains the first fragment plus whatever followed it physically. Formats without an end marker also get a fixed-length extraction that includes trailing data. Structure-aware carvers and fragment recovery techniques improve the outcome but do not eliminate the problem.
Less reliably than on magnetic disks. TRIM commands and background garbage collection cause the controller to erase blocks belonging to deleted files without any host instruction, often within minutes. Recovery may still succeed where TRIM was unsupported or disabled, or where the data was overwritten rather than deleted, but a limited result proves nothing about what was there.
Yes, with careful framing. State that the file was recovered from unallocated space without file system metadata, so there is no original filename, path, or timestamp, and explain the validation applied. Corroborate with artefacts that do carry context, such as shortcut files, jump lists, or registry entries referencing the same content, and record the carving tool and version used.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.