Blank-line guide
What this tool considers an empty line
A line is treated as empty when it contains no characters or contains only horizontal whitespace such as ordinary spaces, tabs, or Unicode spacing characters. A line with a letter, digit, punctuation mark, or another visible character is a content line and is retained. This distinction catches blank-looking rows that still contain invisible indentation.
Input:
First item
[SPACE][SPACE]
Second item
Collapse result:
First item
Second itemChoose a mode based on structure
| Mode | Internal blank lines | Outer blank lines |
|---|---|---|
| Remove all | Every blank line is deleted. | Deleted. |
| Collapse runs | Each run becomes exactly one blank line. | Deleted. |
| Trim outer only | Preserved exactly as entered. | Deleted. |
Useful cleanup cases
- Removing blank rows from copied lists before pasting into another application.
- Reducing excessive vertical gaps in notes or generated text.
- Keeping readable paragraph separation while collapsing repeated blank lines.
- Removing accidental padding around a text block before comparison.
Structure to review carefully
- Markdown uses blank lines to separate paragraphs and some block elements.
- Source code and configuration files may rely on vertical grouping for readability.
- Poetry, transcripts, and scripts may use empty lines intentionally.
- Spreadsheet exports may use blank rows to separate logical sections.
Line-ending behavior
The tool recognizes Windows CRLF, Unix LF, and legacy CR line endings. Processed output uses LF consistently so the result behaves predictably after different line-ending types are mixed. Content inside retained lines is not trimmed or otherwise normalized. Use the separate line-trimming tool if unwanted spaces occur beside visible content.
Difference from removing line breaks
An empty-line operation decides whether whole whitespace-only rows should remain. It does not join one content line to the next. The newline remover instead replaces or deletes stored line endings and can turn multiple content lines into a paragraph. Use this page when the text should remain multi-line but has too much vertical spacing.
How to remove empty lines step by step
- Paste the text. The audit counts whitespace-only lines and how many separate runs of blank lines exist.
- Choose a mode: Remove all deletes every blank line, Collapse runs reduces each run to a single blank line, and Trim outer only removes blank padding around the block while leaving interior spacing untouched.
- Select Remove Empty Lines and confirm that paragraph separation you wanted to keep is still present.
- Copy the result. Output line endings are normalized to LF.
Where extra blank lines come from
Double-spaced output is usually a side effect of converting between formats. Exporting a rich-text document to plain text often writes an empty line after every paragraph. Copying from a web page can capture the margins between block elements as blank lines. Some Markdown editors add a second blank line on save, and generated text from templates frequently leaves blank rows where an optional field was empty. None of these blank lines carry meaning, so collapsing or removing them does not change the content.
Blank lines are meaningful in a smaller set of cases: between Markdown paragraphs and before or after fenced code and lists, as visual grouping in configuration files, between stanzas in verse, and as section separators in some exports. When in doubt, use Collapse runs, which keeps one blank line as a paragraph boundary rather than removing structure entirely.
Worked examples
Flattening a double-spaced export
Text exported with an empty line after every paragraph becomes normal single-spaced paragraphs with Collapse runs. Each run of one or more blank lines becomes exactly one blank line, so paragraph breaks survive while the doubling is gone.
Removing blank rows from a copied list
A list pasted from a document sometimes carries an empty line between items. Remove all produces a continuous list. If some of those "blank" rows actually contain spaces or tabs, the tool still treats them as empty because it tests for whitespace-only content.
Trimming padding before a comparison
When two text blocks differ only by leading or trailing blank lines, Trim outer only removes that padding without altering anything inside, which makes a line-by-line diff meaningful.
Choose a mode by source
| Source | Suggested mode | Check before accepting |
|---|---|---|
| Double-spaced document export | Collapse runs | Paragraph boundaries still readable. |
| Copied list or table rows | Remove all | No intended grouping between items is lost. |
| Markdown source | Collapse runs | Blank lines around lists and code fences remain. |
| Source code or config | Trim outer only, or review first | Vertical grouping inside the file is preserved. |
| Text block for diff or comparison | Trim outer only | Interior lines are byte-for-byte unchanged. |
Frequently asked questions
Is a line with only spaces or tabs treated as empty?
Yes. The tool tests for whitespace-only content, so a row that looks blank but contains invisible spaces or tabs is still removed or collapsed. That includes a row holding only non-breaking space characters, which editors often leave behind to hold a gap open.
Does it join the content lines together?
No. Only whitespace-only lines are affected. To merge content lines into a paragraph, use Remove Line Breaks.
Will indentation or trailing spaces on real lines change?
No. Content lines are kept exactly as entered. Use Trim Lines for edge whitespace on those lines.
What happens to mixed Windows and Unix line endings?
CRLF, LF, and CR are all recognized when detecting blank lines, and the output is written consistently with LF.
What remains unchanged
The order and text of content lines are preserved, including indentation and trailing spaces on those lines. No punctuation, tabs inside a content line, or zero-width characters are removed. For indentation and trailing whitespace, use Trim Lines. For text copied from documents, the PDF text cleanup guide explains how to choose between line and character tools, and the data cleaning guide covers blank rows in exports.