Strip line breaks and extra whitespace from text.
Need to remove line breaks from text before pasting it into a form, email, or document? This free tool lets you strip line breaks instantly — whether you want to collapse everything into a single paragraph, delete blank lines between sections, or trim the extra spaces cluttering each line. Paste your text, pick an action, and get clean output in seconds with no signup required.
'Remove all line breaks' replaces every newline character with a space, turning your entire text into one continuous paragraph. 'Remove empty lines' only deletes blank lines while keeping the existing line breaks between non-empty lines, so your paragraphs or list items stay on separate lines.
Yes. The tool detects and handles all common line-ending formats — Windows CRLF (\r\n), Unix LF (\n), and old Mac CR (\r) — so you get consistent results regardless of where the text came from.
'Trim extra spaces' collapses any run of two or more consecutive spaces within a line down to a single space, and removes leading and trailing spaces from each line. It does not remove line breaks, so your text structure is preserved.
Paste the text into the Input field, then click 'Remove empty lines'. This filters out every line that contains only whitespace, which is the most common cause of excessive spacing when copying from PDFs or Word documents.