Text
100% in your browser
Remove Empty Lines — Clean Up Multi-line Text
Remove empty lines from any text. Choose to remove all, only collapse consecutive empties, or trim only leading/trailing blank lines. Optional inline-space collapse.
Remove Empty Lines — Clean Up Multi-line Text in Seconds
Paste any text and remove unwanted blank lines instantly. Three modes give you fine control: remove every empty line, collapse runs of consecutive empties into a single blank line, or only trim blanks from the start and end of the text. Lines that look empty but contain only spaces or tabs are also handled correctly. Everything runs in your browser.
Modes
- Remove all empty lines: the strictest mode. Every blank line is removed
- Collapse consecutive: a string of 2 or more blanks becomes a single blank — paragraphs are preserved
- Only trim edges: leading and trailing blank lines are removed but everything in the middle is kept exactly as is
Options
- Trim each line: when on, lines with only spaces/tabs count as empty (and the spaces themselves are stripped from kept lines)
- Collapse inline spaces: when on, multiple spaces inside a line become a single space — useful for cleaning up indentation or double-spacing
Common uses
- Cleaning up text pasted from PDFs or messy sources
- Removing the extra blank lines email clients sometimes add
- Preparing CSV-like data before import
- Tidying up log files
- Removing the “double-spacing” effect from copied web content
Privacy
This tool runs entirely in your browser. Your text is never uploaded.