
How to remove empty lines from text
Paste your text into the left box, or drop in a TXT or Word file. Blank lines disappear on the right as you type, and the Show changes view marks every spot where lines were removed so you can check nothing important went missing. Copy the result or download it.
Remove all empty lines, or keep paragraphs
Remove all empty lines deletes every blank line, so each line of text sits directly under the one before it. That's what you want for lists, data, log files and code.
Keep one between paragraphs collapses runs of blank lines into a single one. Your paragraphs stay separated, but the big gaps from copying out of emails, PDFs and web pages are gone.
Why some blank lines don't disappear in other tools
A line can look empty but still contain spaces, tabs, non-breaking spaces or zero-width characters. Many tools only remove truly empty lines, so those stay behind. With Lines with only spaces count as empty turned on, this tool removes them too.
Removing empty paragraphs in Word documents
Drop a .docx file in and you get a .docx back with the empty paragraphs removed and everything else untouched: fonts, bold, headings, images, tables, headers and footers. Page breaks and section breaks are kept, and table cells keep the paragraph Word requires them to have, so the document still opens cleanly.
To do it inside Word instead, open Replace, search for ^p^p and replace with ^p, then repeat until nothing changes. That misses paragraphs containing only spaces, which this tool handles.
Frequently asked questions
Will it keep my line endings?
Yes. Windows-style CRLF line endings are kept in the copied and downloaded text, and a final line break at the end of the file is preserved.
Can I also remove spaces at the start of lines?
Turn on Trim each line to remove spaces and tabs at the start and end of every line. Leave it off for code or anything where indentation matters.
How large a file can it handle?
Files with hundreds of thousands of lines work fine. Very long texts skip the change highlighting to stay fast, but the cleaned result is complete.
Is my text uploaded?
No. Everything happens in your browser, including Word files, and nothing is sent to a server.
