Remove Empty Lines
Delete blank lines from a list or a pasted document. It also catches lines that only contain spaces or tabs — those look empty but are not, and they are the reason other blank-line removers seem to miss lines. If you would rather tidy the spacing than flatten it, one option keeps a single blank line between blocks instead of removing them all.
A line of spaces looks blank but is not empty, which is why blank-line removers often seem to miss lines.
Useful for tidying paragraph spacing without joining the paragraphs together.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Removes truly empty lines and whitespace-only lines
- Can collapse runs of blank lines down to one instead of removing them
- Optionally trims trailing spaces from every line
- Reports exactly how many lines were removed
How it works
- 1Paste your text into the box above.
- 2Choose whether to remove every blank line or collapse them to one.
- 3Copy the cleaned text, or download it as a .txt file.
Remove Empty Lines — frequently asked questions
Because they contain spaces or tabs rather than nothing at all, so a simple empty check misses them. The 'lines that only contain spaces or tabs' option here is on by default for exactly that reason.
More text tools
Looking for something else? Browse all text tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.