How to Delete a File Using WinHex: What You Need to Know

WinHex is a powerful hex editor and disk utility used by forensic analysts, data recovery specialists, and advanced users who need low-level access to storage media. While it's not the tool most people reach for when deleting files, understanding how WinHex handles file deletion reveals a lot about how operating systems actually manage data — and why "deleted" doesn't always mean gone.

What WinHex Actually Does With Files

Before diving into the steps, it's worth understanding what file deletion means at the disk level. When you delete a file through Windows Explorer, the OS typically just marks the file's directory entry as available and releases its clusters in the file allocation table. The actual data sits untouched until overwritten.

WinHex operates below the file system layer, giving you direct access to raw sectors, clusters, and directory structures. This means you can:

  • Delete files through the file system interface (similar to normal deletion but with more control)
  • Wipe file data by overwriting sectors directly (true erasure, not just marking)
  • Manually edit directory entries to remove file records at the metadata level

Each approach produces a meaningfully different result — which matters depending on why you're deleting the file in the first place.

Method 1: Deleting via WinHex's File Manager View

WinHex includes a built-in directory browser when you open a physical disk or logical partition.

  1. Launch WinHex as Administrator — this is required for direct disk access
  2. Go to Tools > Open Disk and select the physical drive or logical partition
  3. Navigate to the directory containing the target file using the directory browser panel
  4. Right-click the file entry and look for delete or wipe options in the context menu

⚠️ The available options depend on your WinHex edition. The Professional and Forensic licenses unlock deeper disk editing features compared to the standard version.

This method removes the file's directory entry, functionally equivalent to a standard OS delete — recoverable with data recovery software unless you follow up with a wipe.

Method 2: Overwriting File Data Directly (Secure Erasure)

If your goal is to make a file unrecoverable, WinHex's real value is in sector-level overwriting. This is how forensic professionals confirm data destruction.

  1. Open the disk or image containing the file
  2. Locate the file's starting cluster using the directory browser
  3. Note the cluster address and file size to calculate how many sectors to overwrite
  4. Select the relevant sector range
  5. Use Edit > Fill Selection to overwrite with zeros, ones, or a random pattern
  6. Save changes back to the disk

Key variables here:

  • File system type (NTFS, FAT32, exFAT) affects how clusters are allocated and tracked
  • File size determines how many clusters need to be overwritten
  • Fragmentation means a large file may occupy non-contiguous clusters, requiring multiple passes

A single-pass zero overwrite is sufficient for modern SSDs and HDDs under most practical threat models, though multi-pass patterns exist for higher-sensitivity use cases.

Method 3: Editing the Directory Entry Manually

This is the most technically demanding approach and the one WinHex is genuinely built for. In FAT-based file systems, marking a file as deleted involves changing the first byte of its 8.3 directory entry to 0xE5. In NTFS, file records in the Master File Table (MFT) carry allocation flags that can be modified directly.

File SystemDeletion MarkerLocation
FAT32 / FAT160xE5 at entry startDirectory sector
exFATAllocation flag clearedDirectory entry set
NTFSMFT record flag 0x0000$MFT file

Editing these values manually gives you precise control but also real risk. A wrong byte in the MFT can corrupt other file records. This approach is used in forensic contexts — either to study deletion behavior or to verify that a deletion was properly executed.

Factors That Change Your Outcome 🔍

Not everyone who asks about deleting files with WinHex is trying to do the same thing. The right method — and the actual result — depends on several variables:

Your file system: NTFS and FAT32 handle deletions very differently at the metadata level. WinHex behaves differently depending on which you're working with.

SSD vs. HDD: On SSDs, TRIM commands and wear-leveling algorithms mean that even sector-level overwrites in WinHex may not guarantee erasure of every copy. The drive's internal controller manages physical cell writes independently of what the OS or software writes. HDDs don't have this layer.

WinHex license tier: The free and standard versions limit some disk editing capabilities. Forensic-grade features — including certain wipe functions and write access to physical disks — require a higher license level.

Your technical comfort level: Manually editing MFT records or sector ranges with incorrect values can render a partition unreadable. This isn't a beginner workflow.

Whether the drive is mounted: Editing a live, mounted system drive while the OS is actively using it introduces race conditions and potential instability. Most reliable disk edits in WinHex happen on unmounted drives or disk images.

What "Deleted" Means Depends on What You Do

A file deleted through WinHex's browser without a follow-up wipe is no more gone than one deleted through the Recycle Bin — the data still occupies its clusters until overwritten by new writes. A file whose sectors have been overwritten directly is substantially harder to recover, with difficulty increasing based on how many passes were used and the storage medium type.

The gap between those two outcomes is significant — and which one matters to you depends entirely on your own reason for deleting the file, the type of storage involved, and the sensitivity of the data you're working with.