Batch delete remove a large number of TXT plain text content in each line at the beginning of the blank part
Translation:EnglishFrançaisDeutschEspañol日本語한국어,Updated on:2025-06-07 20:22
Removing white space at the beginning of each line in a TXT Notepad file ensures the specification of text content and optimizes processing efficiency, which is particularly important for data cleaning, code normalization, and text analysis. When there is blank content at the beginning of a line in a TXT file due to misoperation or after production, deleting the blank at the beginning of the line can solve the problem of data parsing dislocation caused by spaces and reduce the file size. The following describes how to delete the blank content at the beginning of each line in multiple TXT plain files in a unified batch. Multiple text formats are supported: TXT, JSON, HTML, XML, SRT, and CSV.
1. Use Scenarios
after receiving or downloading a lot of TXT Notepad files, the beginning of each line has blank content. We need to ensure the specification of the text or the need for data cleaning. We can delete the blank at the beginning of each line in batch to ensure the accuracy of data parsing and the specification of the text.
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 that needs to delete the blank part at the beginning of each line in the file content.
[Import File from Folder] Import all TXT plain text in the selected folder.
You can view the imported files below.

[Operation] Check below to delete the blank at the beginning of each line.

When the processing is complete, click Save at the beginning of each row to view the blank section of the TXT Notepad file that has been successfully deleted.
