Remove Empty Lines
Delete blank lines from text, collapse runs of empty lines into one, space paragraphs evenly or trim blank lines at the start and end. Space-only lines count too.
Every empty line was removed; lines with text keep their spaces and order.
Text copied from PDFs, emails, spreadsheets and web pages often arrives full of blank lines. This tool removes them in one step, or tidies them: keep a single empty line between paragraphs, put exactly one blank line between every line, or only strip the empty lines at the start and end. Lines that look empty but contain spaces, tabs or invisible characters are treated as empty too, which is where most other cleaners fail.
How to use this tool
- Paste your text.
- Choose whether to remove every empty line, collapse runs of them to one, space all lines evenly, or trim only the start and end.
- Leave “treat spaces as empty” on unless you need space-only lines kept.
- Copy the cleaned text; the note shows how many lines were removed.
Formula
A line is empty if it matches ^[whitespace or invisible characters]*$
Whitespace includes ordinary spaces, tabs, non-breaking spaces and other Unicode spaces; invisible characters include the zero-width space, word joiner, byte-order mark, soft hyphen and the blank Hangul and Braille characters people use as “invisible” text. Windows (CRLF) and old Mac (CR) line endings are converted to plain line breaks first. Lines with text are never changed, so indentation and trailing spaces inside your content stay as they were.
Example
The sample shopping list has 12 lines: 4 with text and 8 that are empty or contain only spaces. “Remove all” leaves the 4 lines “Shopping list, milk, eggs, bread”. “At most one empty line” gives 7 lines, with a single blank line between each item, and “only at the start and end” removes just the 2 trailing blank lines.
Frequently asked questions
Why are some blank lines not removed by other tools?
They contain spaces, tabs or invisible characters such as a zero-width space. They look empty but are not. This tool treats them as empty unless you switch that option off.
How do I keep paragraphs but remove extra gaps?
Choose “Keep at most one empty line in a row”. Paragraph breaks stay, but any run of two or more blank lines becomes one.
Can I remove empty lines in Excel or Word data?
Paste the column or text here, clean it, and paste it back. Each line is treated as one row, so blank rows disappear.
Last updated:
Page address with these inputs: https://kakao.mobile/tools/remove-empty-lines-tool/
Cite or embed this tool
kakaoCalc. (2026, November 8). Remove Empty Lines. https://kakao.mobile/tools/remove-empty-lines-tool/
“Remove Empty Lines.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/remove-empty-lines-tool/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms