
Before we start: If you want to permanently delete a text (.txt) file which contains sensitive information, you can try third-party file shredding software. Donemax Data Eraser is a powerful file shredding software, it can securely and permanently erase the text file and overwrite the disk space of the file, making data recovery be impossible.
PAGE CONTENT:
In today's digital world, data security and privacy are more important than ever. When you delete a text (.txt) file, you might assume it's gone forever. Unfortunately, that's not the case. On both Windows and macOS, deleted files can often be recovered using specialized recovery software - even if you've emptied the Recycle Bin or Trash. This can pose serious risks if the file contains sensitive or personal information.
To make sure a file is truly gone, you need to shred it. Shredding a file means permanently destroying it by overwriting its data multiple times so that it cannot be recovered by any means. In this guide, we'll walk you through the best ways to permanently shred a text file on both Windows and macOS using built-in tools, command-line utilities, and trusted third-party software.
What Happens When You Delete a Text File Normally?
When you delete a file (such as .txt file) on your computer - whether it's dragging it to the Recycle Bin (Windows) or Trash (macOS) - you're not actually removing the file. Instead, the operating system simply marks the space the file occupies as "free" and removes the file's reference from the file system. Until that space is overwritten by new data, the contents of the file remain on the drive and are easily recoverable.
This is why data recovery tools like Donemax Data Recovery, Recuva or PhotoRec are capable of retrieving deleted files even after the bin or trash is emptied. If you've ever accidentally deleted an important file, these tools can be lifesavers. But if you're trying to permanently erase a sensitive document, it becomes a problem.
What Is File Shredding? Can It Permanently Delete a Text File?
File shredding is a process that goes beyond simple deletion. When you shred a file, you overwrite the file's data with random patterns of binary code - often multiple times - to make it completely unreadable and irrecoverable.
Most shredding tools allow you to choose how many passes (overwrites) to perform. The more passes, the harder it becomes to recover the original data. Some shredding standards include:
- DoD 5220.22-M (U.S. Department of Defense standard – 3 passes)
- Gutmann Method (35 passes – highly secure but slower)
- Random Overwrite (1–7 passes – balance between speed and security)
File shredding can help permanently delete or shred a Text (.txt) file.
Methods to Permanently Shred a Text File on Windows
Method 1. Delete Text Files + Wipe Free Space Using Built-in Tools
While Windows does not include a straightforward file shredder, there is a command called Cipher that can wipe free space on a drive, ensuring that deleted files are unrecoverable. However, it does not target individual files.
Cipher Command Usage:
cipher /w:C:\
This command wipes all free space on the C: drive, securely erasing remnants of previously deleted files.
💡 Note: it doesn't shred files directly; files must be deleted beforehand.
Method 2. Shred the Text Files Using Third-Party Erasure Software
To shred individual files on Windows, third-party software is the most effective approach. Donemax Data Eraser is one of the best data erasure software. It offers certified data erasure standards to help permanently delete Text files:
Step 1. Download and install Donemax Data Eraser Windows version on your computer.
Step 2. Open Donemax Data Eraser, choose Erase Files/Folders mode to help permanently delete a text file.
Step 3. Click Add button to add the text file which will be erased.
Step 4. After add the right text file, you can preview it before erasing.
Step 5. Click on Erase Now button, then choose a data erasure standard, click on Continue to permanently erase it.
Step 6. It will securely and permanently erase the selected text file.
Once the process gets finished, the text file is lost for good, can't be recovered by any method.
Other effective data erasure tools for shredding a text file:
▪️ Eraser (Free and Open Source)
Overview:
Eraser is one of the most popular and well-trusted file shredders for Windows. It's free, open-source, and provides multiple data sanitization methods including DoD 5220.22-M, Gutmann (35 passes), and custom algorithms.
Why It's Recommended:
- Clean, simple interface
- Supports task scheduling
- Integrates with the Windows context menu
- Open-source and frequently updated
How to Use:
- Visit https://eraser.heidi.ie and download the latest version.
- Install the software with default settings.
- Once installed, locate the text file you want to shred.
- Right-click the file and select Eraser > Erase.
- Eraser will immediately overwrite and delete the file.
Advanced Use:
- You can create scheduled tasks to automatically erase files or free space on a regular basis.
- Go to Eraser > Settings to select your preferred shredding algorithm.
▪️ BleachBit
Overview:
BleachBit is another free and open-source utility that works across Windows and Linux. Though commonly used for cleaning browser history and temporary files, it also includes a file shredding feature.
Why It's Recommended:
- Clean interface
- Regularly updated
- No bloatware
- Available for Linux users as well
How to Use:
- Download from https://www.bleachbit.org.
- Launch the app and skip any cleaning options if you’re only interested in shredding.
- Go to File > Shred Files.
- Select your .txt file using the file picker.
- Click OK to confirm.
Additional Tip:
You can also use Shred Folders if you want to permanently erase an entire directory of text files in one go.
▪️ CCleaner (with Wipe Drive Function)
Overview:
While CCleaner is primarily used for system optimization and junk file removal, it includes a Drive Wiper feature that can securely overwrite free space. It doesn’t shred individual files out of the box but can be configured to do so through its secure deletion settings.
Why It's Recommended:
- Trusted brand
- Easy to use
- Offers additional system cleaning tools
How to Use:
- Download the official version from https://www.ccleaner.com.
- Open the program and go to Options > Settings > Secure Deletion.
- Choose Secure file deletion (Slower) and select an overwrite method (1-pass, 3-pass, 7-pass, etc.).
- Now, when you delete files using CCleaner, they will be overwritten securely.
- To wipe free space: Go to Tools > Drive Wiper, select your drive, and choose the type of wipe.
Important Note:
Be cautious not to confuse wiping a drive with shredding a single file. Drive wiping is meant to clean up deleted files from free space, not to target specific documents.
▪️ File Shredder
Overview:
File Shredder is a lightweight tool dedicated solely to shredding files and folders. It doesn't come with the extra features of CCleaner or BleachBit, but it performs its job efficiently.
Why It's Recommended:
- Focused tool for file shredding
- Simple UI
- Offers five shredding algorithms
How to Use:
- Download from a trusted source (such as Softpedia or FileHippo).
- Install and run the application.
- Click on Add File or Add Folder.
- Choose the shredding algorithm (Simple One Pass, DoD 5220.22-M, etc.).
- Click Shred Files Now.
Method 3. Overwrite File Contents Using Command Line (PowerShell or Scripts)
You can also write a PowerShell script to overwrite file contents before deleting:
$content = Get-Content "C:\Users\YourName\Documents\file.txt"
$length = $content.Length
$random = Get-Random -Minimum 0 -Maximum 9
$garbage = "0" * $length
Set-Content "C:\Users\YourName\Documents\file.txt" $garbage
Remove-Item "C:\Users\YourName\Documents\file.txt"
💡 Note: This is a basic example and doesn't meet DoD-level standards but can be useful for quick overwriting.
Methods to Permanently Shred a Text File on macOS
Method 1. Delete a Text File Using Terminal Commands (for old OS X versions)
Older versions of macOS (prior to Sierra) included a srm command (Secure Remove), which has been deprecated but may still be available on some systems.
Example Command:
srm -v -m ~/Documents/file.txt
- -v for verbose output
- -m for medium security (7-pass overwrite)
If srm is unavailable, you can overwrite the file manually:
dd if=/dev/urandom of=~/Documents/file.txt bs=1m count=1
rm ~/Documents/file.txt
This writes random data over the file before deletion.
Method 2. Permanently Delete a Text File Using Mac Data Eraser
Donemax Data Eraser for Mac can help in permanently erasing a text file on Mac. It is easy-to-use and powerful.
Step 1. Download and install Donemax Data Eraser Mac version on your Mac.
Step 2. Open Donemax Data Eraser on Mac, then click Add button to add the text file or just drag it to the erasure area.
Preview before erasing.
Step 2. Click on Erase Now button. Then select a data erasure standard, click on Continue button to permanently erase the selected file.
It will securely and permanently erase the selected text file.
Method 3. Secure Empty Trash (Older macOS Versions)
In macOS Yosemite and earlier, there was an option called Secure Empty Trash, which used a 7-pass overwrite. This feature was removed starting in El Capitan for performance and SSD wear reasons.
Precautions and Best Practices for Shredding a Text File
▪️ Double-Check Before You Shred
Shredding is irreversible. Always make sure you're deleting the correct file. Consider creating a backup before shredding in case you act by mistake.
▪️ Clear Free Space Periodically
Even if you delete files and shred them regularly, previously deleted files that weren't shredded may still reside in free space. Use tools like Donemax Data Eraser to wipe free space periodically.
▪️ Use Reputable Tools
Avoid downloading file shredders from unofficial sources. Unverified software can contain malware or spyware. Stick to known and reviewed applications.
▪️ SSD Caution
Modern SSDs (solid-state drives) use a feature called wear leveling, which can complicate traditional overwriting. Most SSD manufacturers provide dedicated tools for secure erasure that interact with the drive's firmware (e.g., Samsung Magician, SanDisk SSD Dashboard). macOS's FileVault and TRIM functions also help reduce recoverability.
Conclusion
Simply deleting a text file is not enough if you want to make sure it's gone for good. Whether you're getting rid of sensitive information, cleaning up old documents, or preparing a device for resale, shredding files is a crucial step in protecting your digital privacy.
On Windows, tools like Donemax Data Eraser, Eraser and BleachBit provide easy and effective shredding. On macOS, apps like Donemax Data Eraser for Mac or Terminal commands can ensure the file is overwritten and destroyed. Whichever method you choose, remember to always verify the source of your software and double-check your files before shredding.
Data privacy starts with taking simple but effective precautions - and securely shredding sensitive text files is one of them.


Donemax Data Eraser
One of the best data erasure programs for permanently erase data from PC, Mac, HDD, SSD, USB drive, digital camera and other devices. Once the data is erased, it is lost for good, cannot be recovered by any method.
Related Articles
- Jan 27, 2024How to Execute Unrecoverable Delete on Windows/macOS/External Storage Device?
- Jan 21, 2025What is ATA Secure Erase? How to Use It?
- Apr 09, 2024Why Can't Erase DVD/CD?
- May 14, 2025Top 3 File Shredder for Windows 11: Delete Files Permanently
- Jul 11, 2024How to Factory Reset Samsung SSD?
- May 23, 2025Format SD Card to NTFS on Windows 11 / 10 / 8 / 7

Christina
Christina is the senior editor of Donemax software who has worked in the company for 4+ years. She mainly writes the guides and solutions about data erasure, data transferring, data recovery and disk cloning to help users get the most out of their Windows and Mac. She likes to travel, enjoy country music and play games in her spare time.

Gerhard Chou
In order to effectively solve the problems for our customers, every article and troubleshooting solution published on our website has been strictly tested and practiced. Our editors love researching and using computers and testing software, and are willing to help computer users with their problems