Remove line breaks
Text copied from a PDF often breaks in the middle of sentences. This tool joins it back into flowing text.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter text and mode.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Each line break, with the spaces around it, becomes one space, or nothing in join mode. In paragraph mode a blank line marks a paragraph boundary and is kept.
Example
Inputs: Mode = Replace each break with a space. Result: Result: This line was cut in the middle when copied from a PDF. A second paragraph starts here.; Line breaks removed: 5.
This line was cut in the middle when copied from a PDF. A second paragraph starts here.
This line was cut in the middle when copied from a PDF. A second paragraph starts here.
Limits and caveats
- In join mode, words stick together where the break sat between two words.
- Lists and tables lose their layout because their lines are merged too.
Questions about this tool
Why does text from a PDF paste with broken lines?
A PDF stores each visible line separately, so the break comes along with the copied text even mid sentence.
When should I keep paragraph breaks?
When the text has several paragraphs separated by a blank line and you only want the lines inside each paragraph joined.
Does it remove extra spaces too?
Only the spaces touching a line break. Spaces inside a line stay as they are.
