Remove Empty Lines
Instantly clean your text by removing all blank and whitespace-only lines
Cleaned Text
Close the gaps in your text
Blank lines pile up when you copy from web pages, PDFs, emails and spreadsheets. They make lists look sparse, add rows to imports, and break scripts that expect one record per line. Remove Empty Lines scans your text and drops every line that is empty or contains nothing but spaces or tabs.
Using the tool
- Paste your text into the Input Text box.
- Look at the two checkboxes: Trim Whitespace and Collapse Multiple into Single. Both start ticked.
- Click Clean Empty Lines.
- The Cleaned Text box shows the result, and three counters report Lines Before, Lines After and Empty Lines Removed.
- Choose Copy to put it on the clipboard or Save to download cleaned_text.txt.
How the settings work in practice
- Every empty or whitespace-only line is removed, whichever way the checkboxes are set. The result has no blank lines at all, including none between paragraphs.
- Trim Whitespace strips spaces and tabs from the start and end of each line that remains. Untick it if leading indentation matters, for instance in code or nested lists.
- The Collapse Multiple into Single checkbox is shown on the page, but the current logic already removes all blank lines, so ticking or unticking it does not leave a single blank line behind.
Typical situations
- Cleaning a pasted list of emails, phone numbers or URLs before loading it into a mailing tool.
- Tightening a transcript or set of notes that has a blank line after every sentence.
- Preparing a column of values copied from a spreadsheet so each row becomes one entry.
- Shrinking a configuration or log excerpt before pasting it into a message.
Points to check
Because paragraph gaps are removed too, running this on prose merges paragraphs into one continuous block of lines. If you need to keep one blank line between paragraphs, use a normalizer that collapses several blank lines into one instead. Lines that contain only invisible characters other than ordinary whitespace may not be treated as blank. The Lines Before figure counts every line in the input, including empty ones. Everything runs in your browser page, and the input box stays unchanged so you can rerun with different settings.
Related Tools
Related Tools