What WinHex does and why you'd use it to delete files

WinHex is a hex editor — a tool that lets you view and edit the raw data on your hard drive at the byte level. Most people delete files by dragging them to the trash, but that doesn't actually erase the data. It just marks the space as available for new files. Until something overwrites it, recovery tools can still read what was there. WinHex deletes files by overwriting that space with new data, making recovery much harder.

You would use WinHex to delete files when you're selling a computer, donating a drive, or need to ensure sensitive documents can't be recovered later. It's not a tool for everyday file deletion — Windows' built-in delete function is fine for that. WinHex is for situations where you need to be certain the data is gone.

Key Takeaways

  • WinHex overwrites file data with new information, making recovery much harder than standard deletion.
  • You need to identify the exact file or sector you want to delete before opening it in WinHex, because the interface shows raw disk data, not a folder structure.
  • The most reliable method is to select the file's data range and use WinHex's overwrite function with a pattern like zeros or random data.
  • WinHex costs money (around $40 to $90 depending on the license type), and free alternatives like Eraser or CCleaner exist if you only need to wipe free space.

Before you open WinHex: what you need to know

WinHex is not intuitive. It shows your disk as a long stream of hexadecimal numbers — the raw bytes that make up every file and empty space. If you open it without a plan, you'll see thousands of lines of data and have no idea which part is the file you want to delete.

Before you launch WinHex, write down the exact filename and location of what you want to delete. If it's a document called "taxes_2023.pdf" in your Documents folder, know that. If it's a folder with multiple files, know that too. You'll need this information to find the right data in WinHex's display.

Also: WinHex requires administrator access on your computer. If you're not the admin, you won't be able to make changes to disk data. And if you're deleting files from a drive that's currently in use by Windows, you may not be able to overwrite them — Windows locks active files. For a drive you're about to sell or donate, the safest approach is to remove it from the computer, connect it as an external drive to another machine, and delete from there.

Finding the file you want to delete in WinHex

Open WinHex and go to File > Open Volume. You'll see a list of your drives. Select the drive that contains the file you want to delete, then click OK. WinHex will load the entire disk as a stream of hex data.

Now use the search function to find your file. Press Ctrl+F to open the Find dialog. Type the filename (or a distinctive phrase from inside the file if it's a text document) and click Search. WinHex will jump to the location where that data appears on the disk.

Once you've found it, you need to identify the exact range of bytes that make up the file. This is where it gets technical. If you right-click on the found data and select Properties, WinHex will show you the file's size in bytes. Write down the starting position (shown in the address column on the left) and add the file size to find the ending position. For example, if the file starts at byte 1,048,576 and is 2,097,152 bytes long, it ends at byte 3,145,728.

Selecting and overwriting the file data

Click at the beginning of the file data in the hex display. Hold Shift and click at the end of the range you calculated. This selects all the bytes that make up your file. The selected area will highlight in blue.

With the data selected, go to Edit > Fill. A dialog will open asking what you want to fill the selection with. You have several options: zeros (all 0x00), ones (all 0xFF), or a custom pattern. For most purposes, zeros or random data works fine. Choose one and click OK.

WinHex will overwrite the selected bytes with your chosen pattern. This replaces the original file data with new information, making it much harder to recover. The file is now deleted in a way that standard recovery tools won't be able to reconstruct it.

When you need to wipe an entire drive or free space

If you're preparing a drive to sell or donate and want to overwrite all deleted files at once, WinHex has a tool for that. Go to Tools > Wipe Free Space. This will overwrite all the empty space on your drive with a pattern of your choice, erasing any traces of files you've already deleted through normal means.

You can choose how many passes to use — one pass (overwriting once) is usually enough for personal use. Government and military standards use multiple passes, but that takes much longer and is overkill unless you're handling classified information.

If you want to wipe the entire drive including all current files, use Tools > Wipe Disk instead. This will erase everything on the drive. Make absolutely sure you have backups of anything you want to keep before you do this.

Alternatives if WinHex is too complex or too expensive

Eraser is free and does the same job with a simpler interface. You can select files or folders in Windows, right-click, and choose Erase. It will overwrite them with random data. Eraser doesn't require you to understand hex editors or disk sectors.

CCleaner (the free version) has a Drive Wiper tool that overwrites free space on your drive. It won't delete specific files, but it will make it harder to recover files you've already deleted through normal means. This is often enough if you're just preparing a computer to sell.

DBAN (Darik's Boot Negation) is free and specialized for wiping entire drives. You create a bootable USB, restart your computer from it, and DBAN will overwrite your entire drive multiple times. It's the most thorough option and requires no technical knowledge beyond following on-screen prompts.

WinHex is worth the cost if you need to delete specific files regularly or want fine-grained control over what gets overwritten. For a one-time wipe before selling a computer, Eraser or DBAN will save you money and time.

What happens after you overwrite: can the file still be recovered?

After you overwrite a file once with WinHex, recovery becomes much harder but not impossible. Specialized forensic tools and techniques can sometimes detect faint traces of overwritten data, especially on older hard drives. However, this requires expensive equipment and expertise — it's not something a casual user with recovery software can do.

For personal privacy (protecting tax documents, medical records, or financial information before you sell a computer), one pass of overwriting is sufficient. If you're concerned about government-level forensics, use multiple passes or use DBAN's multi-pass wiping. For most people, one overwrite is the practical balance between security and time.

Frequently Asked Questions

Can I recover a file after I've overwritten it in WinHex?

Not with standard recovery software. Once you've overwritten the data, tools like Recuva won't find it. Forensic recovery is theoretically possible but requires specialized equipment and expertise that's expensive and usually only available to law enforcement or security professionals.

Will WinHex work on an external USB drive or SD card?

Yes. When you open WinHex and go to File > Open Volume, external drives appear in the list just like internal ones. The process is the same — find the file, select its data range, and overwrite it. This is actually safer than deleting from your main drive because you can't accidentally damage your operating system.

What's the difference between overwriting with zeros versus random data?

Zeros (0x00) are slightly faster because the pattern is simple. Random data is marginally more secure because it's harder to detect patterns that might hint at what was there before. For personal use, either one is fine. The difference matters only in forensic scenarios.

Do I need to restart my computer after using WinHex to delete a file?

No. The overwrite happens immediately. If the file was open in another program, close that program first, then delete it in WinHex. You don't need to restart unless WinHex itself crashes, which is rare.

Is WinHex the only tool that can do this?

No. Eraser, CCleaner, and DBAN all overwrite files or free space. WinHex is more powerful because it lets you target specific files at the byte level, but for most people, the free alternatives are simpler and just as effective.