Remove line breaks
This tool joins lines that break in the wrong places, such as text copied from a PDF or an email. Students, writers and office workers use it to get clean paragraphs they can paste anywhere.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
Example
This text was copied from a PDF and every line ends early, so it is hard to paste. A second paragraph also wraps in the wrong places.
This text was copied from a PDF and every line ends early, so it is hard to paste. A second paragraph also wraps in the wrong places.
How to use the remove line breaks
- Paste your text into the Text with line breaks box.
- Choose whether to keep paragraph breaks in Paragraphs.
- Pick what goes in place of each line break and whether to trim extra spaces.
- Press Run, then Copy result.
How it works
Keep paragraph breaks treats a blank line as the end of a paragraph, joins the lines inside each paragraph and puts one blank line between paragraphs.
Join everything into one paragraph removes every line break, including blank lines.
Windows (\r\n) and old Mac (\r) line endings are handled the same as normal new lines.
Trimming removes spaces at the start and end of each line and collapses runs of spaces into one. Hyphens at the end of a line are kept as typed.
Everything runs in your browser. Your input is not uploaded or stored.
Questions and answers
How do I remove line breaks from text copied from a PDF?
Paste the text, keep Paragraphs on Keep paragraph breaks and press Run. Each paragraph becomes one line of text.
Can I remove line breaks without adding spaces?
Yes. Set Replace each line break with to Nothing. This is useful for joining long codes or IDs that were split over lines.
Will it delete my paragraph breaks?
Only if you choose Join everything into one paragraph. The default keeps blank-line paragraph breaks.