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

Line breaks removed
0
Spaces removed
0
Characters in
0
Characters out
0

How to remove line breaks

  1. Paste your text into the box.
  2. Choose your options: keep paragraph breaks, trim lines, collapse spaces and what to join lines with.
  3. 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

Frequently Asked Questions (FAQ)

How do I remove line breaks from text?

Paste your text into the box. The result updates straight away with every line joined into one. Press Copy result to use it.

Can I keep my paragraphs?

Yes. Tick Keep paragraph breaks. Lines inside a paragraph are joined, and each blank line between paragraphs becomes a single blank line.

How do I remove extra spaces?

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.

What can I join lines with?

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.

Does it handle text copied from a PDF or Word?

Yes. It treats Windows (CRLF), Mac (CR) and Unix (LF) line endings, plus the Unicode line and paragraph separators, as line breaks.

Why are words stuck together after joining?

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.

Is my text uploaded?

No. Everything runs in your browser and your text is never sent or stored.