Large numbers of TXT plain text files exported from systems or automatically generated sometimes contain extra spaces at the beginning of each line, which greatly affects subsequent parsing. When formatting or beautifying text files, leading whitespace can make the document look messy. Cleaning it up improves the browsing experience, and in large-scale storage, removing extra whitespace also saves storage space. Here we explain how to batch delete the whitespace at the very beginning of each line in a large number of TXT notepad files, supporting multiple text formats such as TXT, JSON, HTML, XML, SRT, and CSV.
1. Use Cases
When you have hundreds of TXT plain text files where document content is being written or notes are being organized, extra whitespace at the beginning of lines can cause messy formatting and affect overall aesthetics. We can batch remove the leading whitespace from each line of these files to improve the reading experience.
2. Preview
Before processing:

After processing:

3. Steps
Open【 HeSoft Doc Batch Tool 】, select【Text Tools】-【Delete Whitespace in Text】.

【Add Files】add one or more TXT plain text files that need whitespace removed from the beginning of each line.
【Import Files from Folder】import all TXT plain text files in the selected folder that need whitespace removed from the beginning of each line.
You can view the imported files below.

【Operation】check the option below to delete leading whitespace from each line.

After processing is complete, click the save location to view the TXT files with all leading whitespace removed.
