To remove empty lines from a Word document reliably, copy the text out of Word, run it through a plain-text empty-line remover with the whitespace-aware option enabled, then paste the cleaned text back into Word. This three-step round trip bypasses the brittle Find and Replace ^p^p to ^p trick that many readers reach for first, because Word treats paragraphs as styled objects rather than plain lines, so a single visual blank can be a paragraph with extra space-before, a soft line break inside a styled run, or an empty table cell rather than a real paragraph mark. The plain-text method has the advantage that what you see in the cleaner is exactly what you keep: every retained line comes back byte-for-byte identical, with its leading indentation, trailing spaces, internal spacing, letter case, and Unicode characters unchanged, and only the blank rows you actually wanted gone disappear. Because the cleaning step runs locally in your browser on the raw text, nothing is uploaded, which matters when the Word document contains drafts, client notes, or anything you would rather not leave your machine. The result is a compact version of your text that drops straight back into the same Word document without changing its style or layout, and that is the cleanest way to remove empty lines in Word when manual deletion or repeated Find and Replace is no longer practical.

Why Word Documents Accumulate Empty Lines
Word documents rarely start clean because Word is built around styled paragraphs, and every style change has the potential to leave a blank-looking line behind.
- Pasting from a web page, where each block of HTML often ends with extra paragraph marks the browser never displayed.
- Pasting from another Word document or from a PDF, where the source's spacing was preserved by mapping every visual gap to a real paragraph.
- Repeated Enter presses when a reader wants to push content down a page without using the paragraph spacing controls.
- Imported CSV or table exports that get split by a line break inside cells, producing rows that contain only a separator or whitespace.
- Mail merge fields that return empty values still occupy a paragraph and render as a blank line.
In Word these empties are sometimes real paragraph marks, sometimes extra space-before inside the paragraph style, and sometimes a soft line break (Shift+Enter) sitting on a styled line. Plain text cannot tell the difference between "extra space-before" and "extra paragraph mark," so the visual gap and the textual blank row do not always line up. That is why a method that operates on plain text still benefits from a final visual check inside Word.
Where the Find and Replace ^p^p Trick Falls Short
The textbook workaround in Word is to press Ctrl+H, type ^p^p in the Find box, type ^p in the Replace box, and run Replace All until the count drops to zero. It works on simple documents because two paragraph marks in a row do look like a blank line.
It falls apart in three common situations:
- The empty line is a single paragraph mark, not two. Find and Replace needs a duplicate to remove one, which means one orphan blank survives every pass.
- The document uses Shift+Enter (a manual line break, ^l) rather than Enter for its spacing. A blank line made of ^l^p is not caught by ^p^p.
- The blank line is actually paragraph spacing baked into the style. With space-before set on Heading 2, every heading already looks like a blank line above it. Removing the paragraph mark changes the heading instead of the gap.
When any of these is true, the cleaner result comes from sending the text through a plain-text empty-line filter where the rule is unambiguous: a row that contains nothing, or only whitespace, goes, and every other row stays exactly as it is.
The Copy-Text-Out-and-Clean Method
Copying text out of Word, cleaning it locally, and pasting it back is the most predictable way to remove empty lines from Word, and it works on every modern Word version without macros, add-ins, or VBA.
- In Word, select the passage that has the stray blanks. Use Ctrl+A to grab the whole document if the blanks are scattered throughout, or hold Ctrl and click each paragraph that needs cleaning.
- Press Ctrl+C with the selection active. Do not use Ctrl+X; you want the original passage intact in case you want to compare the result against it.
- Open the Remove Empty Lines tool in a new browser tab. Paste the copied text with Ctrl+V into the input box.
- Leave the whitespace-only option enabled if the blanks came from a web page, a PDF, or any source where editors may have left invisible indentation. Switch it off only if the document is generated code or configuration where rows of pure indentation carry meaning.
- Click Process. Read the input, retained, and removed line counts shown in the summary. If the removed count is zero, your document had visual gaps from paragraph spacing rather than real empty paragraphs, and Find and Replace may actually be the better tool for that document.
- Select the cleaned text in the output box, copy it with Ctrl+C, return to Word, and place the cursor at the start of the original passage. Paste with Ctrl+V, then choose Match Destination Formatting from the paste options mini-bar, or right-click and pick Keep Source Formatting if you copied the original text as plain text.
- Visually compare the cleaned section against your expectations. Retained lines should be identical to the original; only the empty rows should be gone.
Choosing Whitespace-Only or Strict Empty Mode
The default mode on the cleaner is the right choice for almost every Word cleanup, and the strict mode exists for a narrow set of technical documents.
The mode controls one decision only: whether a row made entirely of spaces, tabs, or other Unicode whitespace counts as empty. It does not change how much of the text is kept, how lines are ordered, or how retained lines are trimmed.
| Setting | Lines removed | Lines retained | Best for |
|---|---|---|---|
| Whitespace-only (default) | Empty lines and lines whose Unicode-aware trim is empty, so spaces, tabs, non-breaking spaces, and other recognised whitespace all count as blank | Lines that contain at least one non-whitespace code unit | Word text pasted from web pages, PDFs, email clients, or mixed-source drafts |
| Strict empty-only | Only lines with zero code units | Lines containing one or more characters, including a single space, tab, or non-breaking space | Configuration snippets or code where indentation-only rows carry meaning |
If you are unsure, run the cleaner once with whitespace-only on. If the result collapses too aggressively, switch to strict mode and re-process. Each run replaces the previous result, and counts reset immediately.
Worked Example: 9 Lines In, 4 Lines Out
Here is a single sample Word paste that exercises the cleaner's main behaviour, so the relationship between the two modes is easy to see on real numbers.
The input is nine lines copied from Word:
- Quarterly summary
- (empty)
- Revenue rose 12%.
- (empty)
- (a row that contains four ordinary spaces)
- Costs fell 4%.
- (empty)
- Forecast revised.
- (a final trailing empty line, because Word's clipboard includes a trailing paragraph mark)
With whitespace-only mode enabled, the cleaner removes lines 2, 4, 5, 7, and 9, because line 5 contains only spaces and the browser's Unicode-aware trim leaves it empty. That is 5 removed and 9 − 5 = 4 retained. The output is exactly four lines: Quarterly summary, Revenue rose 12%., Costs fell 4%., Forecast revised., joined with single LF breaks.
With strict empty-only mode, lines 2, 4, 7, and 9 have zero code units, so 4 are removed and 9 − 4 = 5 retained. Line 5 stays as four spaces, lines 6 and 8 stay untouched, and the visual gap the user expected to lose is still there.
The numbers confirm the rule without arithmetic beyond subtraction, and the result is something a reader can copy back into Word and review against the original.
What Stays Exactly the Same in Your Cleaned Text
The cleaner has one job, and it does not creep into the rest of the text. Knowing what stays put is what makes the round trip safe to paste back into Word.
Retained lines keep, byte for byte:
- Leading indentation, including tabs, ordinary spaces, and non-breaking spaces.
- Trailing spaces on every line.
- Repeated internal spaces, including the double space after a sentence.
- Punctuation, letter case, digits, and Unicode characters.
- The original order of every retained line.
What the cleaner does not touch, even when it would be tempting:
- Internal whitespace inside a line is never collapsed or reflowed.
- Letter case, punctuation, and duplicate content are not changed; the tool does not sort, dedupe, or normalise Unicode.
- Line breaks inside a retained line are not merged or split. The only decision per line is whether it passes the blank-line predicate.
That separation is also why the cleaner does not parse Word documents, rich text, CSV with embedded newlines, or quoted JSON strings: it sees a browser string and documented line boundaries only. The preserved bytes are guaranteed only when the input is plain text.
Edge Cases: Trailing Blanks, Mixed Breaks, and the Size Cap
Three situations are worth checking before you paste the cleaned text back into Word, because they are the ones that most often surprise readers.
A trailing empty line. If your Word selection ends with a paragraph mark, the clipboard usually includes a final line break. The cleaner treats that as one extra empty line and removes it under either mode. The output therefore has no trailing newline, which is normally fine in Word because Word always re-adds one when it saves the file.
Mixed line endings. Word documents saved as .docx are usually CRLF internally, but text copied from the clipboard can be CRLF, LF, or a mix if the source was edited on different platforms. The cleaner treats all three as a single boundary, following the standard String.split convention, and joins retained lines with LF. The visual result in Word is identical, and you do not see stray carriage returns.
The size cap. The cleaner accepts up to 1,000,000 UTF-16 code units and rejects more with a visible error before processing, with no partial output. A Word document at the limit is accepted, and one additional character causes the input to be rejected. If your document is larger, paste it in sections, clean each section, and stitch them back together in Word.
If you want to verify the input size before pasting, a quick line and character count in the browser gives you a number you can compare against the cap. The Line Counter reports total, non-blank, and blank lines without uploading the text.
Related Tasks After You Have Removed Empty Lines
Removing empty rows is rarely the last step. A few adjacent tasks use the same plain-text approach and feed naturally into the round trip back into Word.
If the cleaned text still has duplicate lines, run it through the Remove Duplicate Lines tool, which keeps the first occurrence of each line and preserves every retained character exactly.
If the result needs to be one paragraph instead of one line per row, send it through the Line Break Remover to join lines with a chosen separator. That tool never trims the retained text and never collapses internal whitespace, so the rest of the document is preserved.
If you want to know how many lines you removed before pasting back into Word, paste the input and the output into a line counter. The total, non-blank, and blank counts give a number that matches the cleaner's own report and lets you confirm nothing else changed.
For a deeper look, see How to Read Difficult Texts With a Line Diff.
For a deeper look, see How to Split a Text File Into Multiple Files by Line Count.