If you receive a text file created in a text editor other than the one that you use, you may find that the file has certain formatting issues such as extra blank lines. This can make the file difficult to read and inappropriate for distribution to someone else. However, several free utilities exist to remove blank lines from text files. Remove blank lines from a text file using a Web-based utility or a downloadable one.
Removing Blank Lines with a Web-based Tool
Browse to either My Text Tools or Bo Allen website and open the text file from which you want to remove blank lines using the text editor of your choice.
Click inside the text editor to place a cursor somewhere in the text file, then press the "Ctrl-A" keys simultaneously to highlight the entire file.
Press the "Ctrl-X" keys simultaneously to cut the file to the Windows clipboard.
Click in the text entry box for the Web-based tool you have selected and press the "Ctrl-V" keys simultaneously to paste the text file into the box.
Click the "Remove Empty Lines" or "Remove Blank Lines" button. The blank lines are removed from the file.
Highlight the text in the box, cut it to the Windows clipboard and paste it back into the text editor using the keyboard shortcuts described in this article, then save the file.
Removing Blank Lines with a Standalone Utility
Download the Remove Blank Lines utility and install and launch it.
Select the radio button labeled "Backup files then delete blank lines in input files." This causes the utility to modify the text file only after creating a backup to ensure the original data are retained in the event of a problem.
Click "Open and fix files."
Browse to the location of the file from which you want to remove the blank lines and double-click it. A backup file is created in the same location with the prefix "Copy of." All blank lines are removed from the original file.
- keyboard image by Fyerne from Fotolia.com