Remove empty lines
Delete blank lines from a list, or close up the extra ones.
Deletes every line that holds nothing but spaces, tabs, or other whitespace. Line order, duplicates, indentation, and your line endings stay as they are, and a final newline is kept. Up to 200,000 characters.
Result
Start typing and the result appears here. No button needed.
Remove empty lines, without the extra steps.
Strip the blank lines out of pasted text without disturbing the lines you want. Choose whether a line holding only spaces or tabs counts as empty, or keep one blank line where there were several so paragraphs stay separated. The result updates as you type, and the count of removed lines is stated before you copy anything.
How to use this tool
- 1Paste the text with the unwanted blank lines. Your original stays visible above the result.
- 2Choose Empty lines, Empty & spaces, or Extra blanks. The result updates automatically when you type or change the choice.
- 3Read how many lines were removed, check the cleaned text, then select Copy result.
When Remove empty lines is the right tool
- A list copied out of a spreadsheet column arrives with a blank line between every value, and you need it compact before pasting it somewhere that counts rows.
- Text lifted from a PDF has a gap after every line, and the lines that look blank actually hold spaces or tabs.
- A Markdown draft has grown three and four blank lines between sections, and you want exactly one gap left between paragraphs.
- A line copied from a web page looks empty but survives the cleanup, and you need to know which line is holding an invisible character.
Empty and blank are not the same line
A line with no characters at all is empty. A line holding two spaces or a tab looks identical on screen but is not, and that is usually what pasted text contains. Empty lines removes only the first kind, which is the safe choice when whitespace is structurally meaningful in what you pasted. Empty & spaces removes both and is the right default for a list out of a spreadsheet or a PDF. Switching between them changes the count of removed lines immediately, so you can see which kind you have.
Extra blanks keeps your paragraph breaks
Deleting every blank line from prose runs the paragraphs together visually, because the separation between them was the blank line. Extra blanks removes nothing where a single gap appears and keeps only the first blank line of every longer run, so a document with three- and four-line gaps comes back with consistent single gaps. Whitespace-only lines count toward a run in this mode. Nothing is rewrapped and no line is joined to the line above it.
A line that looks empty can legitimately stay
Zero-width spaces, soft hyphens, and word joiners are not whitespace to a computer, so a line containing one is not blank however empty it looks. Removing it silently would be a guess about text you cannot see. Instead the line is kept, counted, and the first one is named by its line number in your input, so you can delete it deliberately. Non-breaking spaces and the byte-order mark are whitespace and are removed by Empty & spaces.
A few quick answers.
Empty lines removes only lines with no characters at all. Empty & spaces also removes lines holding spaces, tabs, non-breaking spaces, and other whitespace, which is what pasted text usually contains. Extra blanks removes nothing until a blank line repeats, then keeps the first of each run so paragraph separation survives.
No. Removing a blank line deletes that line and its break; the lines around it keep their own line endings and stay on separate lines. Nothing is wrapped or joined into one paragraph. If you want wrapped prose turned into a single line, that is a different operation from deleting blank lines.
The line removal runs locally in your browser, with no text upload. Your original stays in the input until you clear it or leave the page, so you can compare the two. Copy result writes only the cleaned output to your clipboard when you ask for it.
Those lines probably hold spaces or tabs, and Empty lines removes only lines with nothing at all on them. Choose Empty & spaces and the count changes immediately. If it still says no blank lines were found, one of the lines may hold a zero-width character, which the workspace reports with its line number.
Yes. The summary states how many lines were deleted and how many were kept, counted against the lines in your input. A trailing newline at the very end of the text is treated as the end of the last line, not as an extra blank line, so pasting a file that ends with a newline does not inflate the count.
Yes. Each kept line keeps the separator that followed it, so CRLF stays CRLF and a mixed paste stays mixed. Browser textareas can normalize pasted line endings to LF before the tool ever sees them; when exact separators matter, supply the text through the agent input instead of pasting it.