Remove Empty Lines
Delete the blank lines from lists, code, copied emails and documents in one step. Remove every empty line, or keep a single blank line between paragraphs so the text still breathes. Lines that only contain spaces count as empty too.
How to Remove Empty Lines From Text
Quick answer: paste your text; blank lines disappear straight away. Choose Keep one between paragraphs to leave single gaps.
-
1
Paste your text
Or open a text file.
-
2
Choose the mode
Remove all blank lines or keep single gaps.
-
3
Check the result
Every line with text is kept.
-
4
Copy or download
Use the cleaned text anywhere.
What You Get
Why Remove Empty Lines?
Blank lines pile up when you copy text from emails, web pages, PDFs and chat apps, or when lists are exported from other programs. They make lists harder to paste into spreadsheets, add gaps to code and documents, and can create empty entries when the text is imported into another tool. Removing them gives you a compact, tidy list or document.
Two Ways to Clean Up
All blank lines removes every empty line so each line of text follows directly after the previous one. This is what you want for lists, data, email addresses and code.
Keep one between paragraphs collapses several blank lines into one and removes any at the very start and end. It is ideal for documents and articles, where a single gap between paragraphs helps reading but large holes look messy. With lines with only spaces count as empty ticked, lines that look blank but contain spaces or tabs are treated as empty too.
Related Clean-Up Tools
Combine this tool with Remove Extra Spaces to fix spacing inside lines, Remove Duplicate Lines to keep each line once, and Sort Lines to put a list in order. Each tool has a Use as input button so you can run them one after another.
Example
You export a list of 200 product names and every second line is blank. Paste the list here and you instantly get 200 lines with no gaps, ready to paste into a spreadsheet column where each name lands in its own row.
Who Removes Empty Lines?
Office workers pasting lists into spreadsheets, where every blank line becomes an empty row. Developers tidying code, configuration files and logs. Writers cleaning up text copied from emails and web pages, which often arrives with extra gaps. Marketers preparing keyword and email lists, and teachers cleaning up exported names before making groups. Anywhere lists are moved between programs, blank lines tend to appear, and this tool removes them instantly.
Tips
Use Keep one between paragraphs for articles, letters and documents, and All blank lines for lists and data. If a line looks empty but is not removed, it may contain an invisible character other than a space; running the text through Remove Extra Spaces first fixes that.
Good to Know
The tool works line by line: a line is removed only when it has no visible characters at all. Lines that contain only spaces or tabs are treated as empty when the option is ticked, which matches what you see on screen. Every other line is copied exactly as it is, including leading spaces and indentation, so code and nested lists keep their structure. Windows, Mac and Linux line endings are all recognised, and the result uses standard line breaks that paste correctly into any program.
The summary on the left shows how many lines the text had before and after, so you can see at a glance how many blank lines were removed.
Private, Free and Instant
The tool is free and works instantly on long text up to 5 MB. There is no sign-up, no limit and no watermark. The conversion runs entirely inside your browser, so your text is never uploaded, stored or shared, which makes the tool safe for emails, contracts, student work and anything confidential. It works the same on Windows, Mac, Linux, Chromebooks, iPhone and Android, and the result updates instantly as you type or paste. You can also open a text file from your device and download the converted text as a new .txt file.
Removing Blank Lines From Text
Blank lines creep into text pasted from emails, PDFs and web pages. Removing them tightens a list and makes data easier to import.
Things to decide
Do lines that contain only spaces count as empty? Often they should. Should paragraphs be kept separated by one blank line? You may want to keep single blank lines to preserve structure. For stray spaces, use remove extra spaces.
Check whether blank lines were separating records; removing them may merge sections that you wanted to keep apart.
Frequently Asked Questions
Questions about removing empty lines