Remove Line Breaks
Convert multi-line text into a single clean line
Words: 0Characters: 0
Joins text broken across lines into a single line — useful for text copied from PDFs and emails, where every line ends with a hard break, or for turning a list into a comma-separated line.
How to use it
- Replace line breaks with — what goes where each line break was: a space by default, or anything else, such as
,or|. Leave it empty to join lines with nothing between them. Blank lines are treated as one break, so a run of them becomes a single replacement, and blank lines at the start or end add nothing. - Keep paragraph breaks — off by default: when on, only the lines inside each paragraph are joined, and paragraphs stay apart with one blank line between them, however many separated them before. Lines of only spaces count as blank.
- Trim extra spaces — on by default: removes spaces at the start and end of each line and collapses runs of spaces and tabs, so joined lines don't end up with double spaces.
Examples
Joining PDF text, with the default options
- Text
The results were consistent across all three trials.
- Revealed
The·results·were·↵ consistent·across··↵ all·three·trials.
- Joined
- The results were consistent across all three trials.
Shown with · for a space, → for a tab and ↵ for a line break.
Trim extra spaces drops the spaces left at the ends of lines, so each break becomes one space.
A list to comma-separated values
- Text
apples bananas cherries
- Replace line breaks with
- ", "
- Joined
- apples, bananas, cherries
PDF text with paragraphs
- Text
Copied text breaks at the end of every line. Paragraphs stay apart when breaks are kept.
- Keep paragraph breaks
- On
- Joined
Copied text breaks at the end of every line. Paragraphs stay apart when breaks are kept.
Two blank lines between the paragraphs become one.
See also
- Remove Extra Spaces — to clean spacing while keeping the lines.
- Word & Character Counter — to check the length of the joined text.