--- title: "Remove empty lines — free, runs in your browser" description: "Delete blank lines from a block of text, optionally collapsing runs to one. Free, no sign-up, and nothing you enter leaves your browser." url: https://atoneplace.net/tools/remove-empty-lines/ site: "At One Place" --- # Remove empty lines Delete blank lines from a block of text, optionally collapsing runs to one. ## How it works Removes blank lines from pasted text. Lines containing only spaces or tabs count as blank, which is what people usually want — a line that looks empty but holds a stray space is still clutter. The collapse option is the gentler version: instead of removing every blank line, it reduces runs of two or more down to a single blank, so paragraph breaks survive while double and triple spacing does not. > This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected. ## Common questions ### Does a line with only spaces count as empty? Yes. Lines containing nothing but whitespace are treated as blank, since that is almost always the intent. ### How do I keep paragraph breaks? Use the collapse option, which reduces runs of blank lines to one instead of removing them all. ## Related pages - [Word and character counter](https://atoneplace.net/tools/word-counter/) - [Typing speed test](https://atoneplace.net/tools/typing-speed-test/) - [Remove duplicate lines](https://atoneplace.net/tools/remove-duplicate-lines/) - [Sort lines alphabetically](https://atoneplace.net/tools/sort-lines/) - [JSON formatter and validator](https://atoneplace.net/tools/json-formatter/) - [Text compare](https://atoneplace.net/tools/text-diff/) - [Regex tester](https://atoneplace.net/tools/regex-tester/) - [Case converter](https://atoneplace.net/tools/case-converter/) - [Find and replace](https://atoneplace.net/tools/find-and-replace/) - [Readability checker](https://atoneplace.net/tools/readability-checker/)