Remove Empty Lines
Strip blank and whitespace-only lines from text.
Use on any page (bookmarklet)
Want Remove Empty Lines without leaving the page you're on? Drag the button below to your bookmarks bar, then click it on any website to open Remove Empty Lines right there — it runs entirely in your browser.
Use responsibly: a bookmarklet runs on whatever page you click it on. Avoid sensitive sites such as online banking, payment, or healthcare pages — you run it at your own risk. Everything is processed locally and no data is sent anywhere. See our Terms.
- Show your bookmarks bar if it's hidden — Ctrl+Shift+B (⌘+Shift+B on Mac).
- Drag the button above onto the bookmarks bar.
- Open any website and click the bookmark — the Remove Empty Lines panel appears in the top-right corner. Use ✛ to move it between corners, or ›/‹ to tuck it against the edge and pull it back out.
- Click the bookmark again (or the ✕) to close it.
Note: a few sites with strict security policies may block bookmarklets.
Examples
Strip blank lines
Input
First Second Third
Output
First Second Third
Whitespace-only line removed
Input
alpha beta
Output
alpha beta
About this tool
This free online tool removes empty and blank lines from any text. Paste double-spaced content, messy copy-paste output, or a list with gaps and get back compact, single-spaced text. It can also drop whitespace-only lines and trim the lines it keeps. Everything runs in your browser with no upload.
How to use
- Paste your text into the input box (or click Sample to try it).
- Choose whether to drop whitespace-only lines and whether to trim each kept line.
- Copy the cleaned text from the output box.
Common uses
Tidying text copied from PDFs or emails, compacting double-spaced lists, cleaning data before importing, and removing the blank rows that creep into pasted spreadsheet columns.
Frequently asked questions
Is this empty line remover free?
Yes — it's a completely free online tool with no sign-up and no limits. Paste your text and strip blank lines instantly.
Does it remove whitespace-only lines?
By default yes — lines that contain only spaces or tabs are treated as empty. Turn off 'Drop whitespace-only' if you only want to remove truly empty lines.
What does 'Trim lines' do?
It trims leading and trailing spaces from the lines that remain, so the output has no stray indentation.
Does it keep the order of my text?
Yes. Non-empty lines stay exactly where they were; only the blank lines between them are removed.
Is my text uploaded anywhere?
No. Everything runs in your browser with no upload, so your text never leaves your device.
Can it collapse double spacing in a document?
Yes — pasting double-spaced text and removing empty lines gives you single-spaced, compact text.
Learn more
Related tools
Regex Tester
Test regular expressions with live match highlighting, groups, and replace.
Word Counter
Count words, characters, sentences, and reading time.
Case Converter
Convert text between upper, lower, title, camel, and snake case.
Character Counter
Count characters and stay under tweet, SMS, and meta tag limits — live.