Remove Line Breaks Tool (Remove Extra Spaces and Newlines)
Paste your text to join the lines, remove extra spaces and clean it up. Keep paragraph breaks if you want them. It runs in your browser and your text is never uploaded.
Your text
Options
Result
How to remove line breaks
- Paste your text into the box.
- Choose your options: keep paragraph breaks, trim lines, collapse spaces and what to join lines with.
- Press Copy result.
What counts as a line break
Windows (CRLF), Mac (CR) and Unix (LF) line endings are all removed, along with form feeds and the Unicode line and paragraph separators that often come with text copied from PDFs and web pages. Blank lines are dropped when joining, so you never get a double space. With Keep paragraph breaks on, each run of blank lines becomes one blank line and only the lines inside a paragraph are joined.
Related tools
Remove repeated lines with the remove duplicate lines tool, order them with sort lines alphabetically, count the result with the word counter or change capitalisation with the case converter.
See also
- Dedupe a list with the remove duplicate lines tool.
- Put lines in order with the sort lines alphabetically tool.
- Check the length of your text with the word counter.
- Change capitalisation with the case converter.
Frequently Asked Questions (FAQ)
Paste your text into the box. The result updates straight away with every line joined into one. Press Copy result to use it.
Yes. Tick Keep paragraph breaks. Lines inside a paragraph are joined, and each blank line between paragraphs becomes a single blank line.
Leave Collapse repeated spaces ticked. Runs of spaces or tabs become one space, and Trim each line removes spaces at the start and end of every line.
A space (the default), nothing at all, or a comma and a space. Joining with commas turns a list on separate lines into one comma separated line.
Yes. It treats Windows (CRLF), Mac (CR) and Unix (LF) line endings, plus the Unicode line and paragraph separators, as line breaks.
You probably chose to join with nothing. Switch the joiner to a space. Also check whether your source text was hyphenated at line ends, which the tool leaves as it is.
No. Everything runs in your browser and your text is never sent or stored.
Related Tools
- Remove Duplicate Lines (Dedupe, Sort, Ignore Case, Trim)Remove duplicate lines from a list online. Ignore case, trim spaces, drop blank lines, sort and keep the first or last copy, with a count of what was removed. Runs in your browser.
- Sort Lines Alphabetically (A-Z, Z-A, Numeric, Length, Shuffle)Sort lines of text alphabetically online. Sort a list A to Z or Z to A, in natural number order, by line length, reverse it or shuffle it. Runs in your browser.
- Word Counter (Characters, Sentences and Reading Time)Count words, characters with and without spaces, sentences and paragraphs. Reading and speaking time and keyword density. Runs in your browser.
- Case Converter (Uppercase, Lowercase, Title Case, camelCase)Change text to upper case, lower case, title case, sentence case, camelCase, snake_case or kebab-case and copy it in one click. Runs in your browser.