Thousands of TXT plain text files one-time batch delete all blank lines
Translation:EnglishFrançaisDeutschEspañol日本語한국어,Updated on:2025-06-07 20:22
TXT Notepad file may generate a large number of blank lines by exception. Before data analysis or text mining, deleting the blank lines can reduce its interference, ensure the continuity of effective content and improve processing efficiency. Although blank lines do not affect code execution, deleting not only reduces the size of the file, but also makes the text more compact and concise for storage, transmission, and troubleshooting. The following describes how to quickly delete unnecessary blank lines in a large number of TXT pure files. TXT, JSON, HTML, XML, SRT, and CSV text formats are supported.
1. Use Scenarios
when hundreds of TXT plain text files generate countless blank lines due to exceptions, in order to ensure the beautiful and consistent content while saving storage space, we can delete these blank lines in TXT Notepad in a unified batch.
2. Effect preview
before treatment:
after treatment:
3. Operation steps
open 【HeSoft Doc Batch Tool], select [Text Tool]-[Delete Blank in Text]].

[Add File] Add single or multiple TXT plain text files that need to delete blank lines.
[Import File from Folder] Import all TXT plain text files in the selected folder.
You can view the imported files below.

[Operation] Check below to delete all blank lines.

When the process is complete, click Save Location to view the successfully deleted TXT Notepad file with blank lines.
