Remove Empty Lines
Delete blank lines — including lines with only spaces or tabs — and keep everything else exactly as it is.
Remove Empty Lines works on your text locally in your browser.
Remove the gaps from copied text and lists
Text copied from PDFs, emails, and web pages often arrives with blank lines scattered through it — double-spaced paragraphs, gaps between list items, or lines that look empty but contain spaces. Paste it in and every empty line disappears as you type, while the lines with content stay exactly as they were, indentation included.
How to remove empty lines
- Type or paste your text, or choose Upload Document to open a .txt, .md, .docx, or .pdf file.
- The result appears immediately below, with counts of what changed.
- Choose Copy Result to use it elsewhere, or Replace Input with Result to keep working here — Undo Replace brings the original back.
What counts as an empty line
- A line with nothing on it.
- A line containing only spaces, tabs, or other whitespace characters such as non-breaking spaces.
- Every other line is kept character for character — nothing is trimmed or rewritten.
- Windows (CRLF) and Unix (LF) line breaks are both handled, and the result keeps the same style.
| You enter | You get |
|---|---|
| Apple Orange Banana | Apple Orange Banana |
Your text stays on your device
- Text is processed by JavaScript running in your browser.
- Your text is never uploaded to Looty Tools or any other server.
- Uploaded documents are opened and read in your browser; the file itself is never sent to Looty Tools.
- Nothing is stored — refreshing or closing the page clears both boxes.
Limitations
- Uploads accept .txt and .md files up to 5 MB, Word .docx files up to 15 MB, and PDFs up to 25 MB and 50 pages. Older .doc files are not supported, and scanned or image-only PDFs have no text to use.
- All blank lines are removed, including ones that separated paragraphs you may want to keep apart.
- A line containing only an invisible zero-width character is not treated as empty, because that character is not whitespace.
- Spaces inside lines are not changed; use Remove Extra Spaces for that.
Related text tools
- Paragraph CounterCount the paragraphs in a piece of writing.
- Remove Duplicate LinesDelete repeated lines and keep one copy of each.
- Remove Extra SpacesCollapse repeated spaces and trim each line.
Guides
- Blank Lines in Copied TextWhy text copied from PDFs, emails, and web pages arrives with extra blank lines, and how to decide which of them to remove.
- When to Keep Blank LinesWhere blank lines carry structure — Markdown paragraphs, poetry, plain-text email, and code — and when they are safe to remove.
- Blank Lines in Word, Excel, EditorsHow to remove blank lines with Word’s ^p find and replace, Excel’s Go To Special and filters, and regular expressions in code editors.
Remove Empty Lines FAQ
- What counts as an empty line?
- A line with nothing on it, or with only spaces, tabs, or other whitespace characters such as non-breaking spaces.
- Will it change the lines that have text?
- No. Lines with any visible content are kept exactly as they were, including their own leading spaces or indentation.
- Can I keep one blank line between paragraphs?
- Not with this tool — it removes every empty line. If some blank lines separate paragraphs you want to keep apart, add those line breaks back after cleaning, or only paste the part of the text that needs cleaning.
- Does it work with Windows line endings?
- Yes. Text with Windows (CRLF) line breaks is handled, and the result keeps the same kind of line breaks.
- Does it remove spaces inside lines too?
- No. To collapse repeated spaces and trim each line, use Remove Extra Spaces.
- Can I upload a Word document or PDF instead of pasting?
- Yes. Upload Document accepts .txt, .md, Word .docx, and text-based .pdf files, or you can drop a file onto the text box. The file is read in your browser — it is not sent to Looty Tools — and its text replaces whatever is in the box. Scanned PDFs without a text layer and older .doc files are not supported.
- Is my text uploaded or stored?
- No. Blank lines are removed in your browser; your text is never sent to Looty Tools or saved.
