sw-tool

Remove Empty Lines Online

Free online line remover: remove empty lines and extra spaces, sort lines A to Z, add line numbers or join lines with a separator. Paste, clean, copy.

Paste text and pick options. The cleaned result appears on the right.

Clean up text in one place

Paste on the left and toggle the options below. The result updates on the right; press Copy result to take it.

Remove empty lines and extra spaces

Text copied from web pages and PDFs is full of blank lines and doubled spaces. "Remove empty lines" and "Collapse extra spaces" tidy it up.

Sort lines naturally

Sort A → Z, Z → A, shortest first, or reverse the order. Numbers sort naturally, so 2 comes before 10.

Join lines or add numbers

Join lines into one with a separator like a comma, or prefix each line with 1. 2. 3.

Why copied text breaks

Text copied from a PDF often has a line break at the end of every visual line, because PDFs store text by position on the page. Joining lines and keeping only the breaks between paragraphs restores the original flow. Cleaning stray spaces before pasting into a spreadsheet also stops identical values from failing to match.

FAQ

Can the separator be a line break?
Yes, type \n in the separator box.
Can it remove duplicates?
Use Remove Duplicates for that.

Free Text Tools →