How to use the remove line breaks
- 1Paste the text into Text with line breaks.
- 2Choose an action under What to do. Remove line breaks, keep paragraphs is the usual fix for text copied from a PDF.
- 3Choose what replaces each break under Replace line breaks with: a space, nothing, a comma or your own text.
- 4Press Copy, or Reuse to run another step on the result.
Example
Text copied from a PDF often breaks in the middle of a sentence, because each line of the page ends with a hard line break. A blank line between blocks marks a new paragraph, and this tool can keep it.
Text copied from a PDF often breaks in the middle of a sentence, because each line of the page ends with a hard line break. A blank line between blocks marks a new paragraph, and this tool can keep it.
Default settings. The three breaks inside the paragraphs become spaces; the blank line between the paragraphs stays.
Removing all line breaks
Remove all line breaks turns the whole text into a single line. Blank lines are treated like any other break. When the replacement is a space or a comma, spaces at the start and end of each line are trimmed first, so you don't get doubled spaces where lines meet, and Collapse repeated spaces tidies any that remain.
Use it for fields that must be one line: a meta description, a spreadsheet cell, a JSON string or a form that rejects line breaks.
Keeping paragraph breaks
A paragraph break is a blank line: two line breaks in a row, even if the empty line contains a few spaces. Remove line breaks, keep paragraphs joins the lines inside each paragraph and leaves exactly one blank line between paragraphs.
If the source has no blank lines between paragraphs, there is nothing to tell where one paragraph ends and the next begins. In that case join everything, then use Add a break after punctuation or add the breaks back by hand.
Replacing breaks with spaces, commas or custom text
- A space (default) for normal prose.
- Nothing for things that were split mid-word, such as long codes, keys or Base64 strings wrapped at a fixed width.
- Comma and space to turn a column copied from a spreadsheet into a list:
apple,banana,cherryon three lines becomeapple, banana, cherry. - Custom text… for anything else, such as
|or;. Type\nor\tfor a line break or a tab.
Adding line breaks
Add a break every N characters wraps lines at N characters. With Don't split words ticked, a word that would cross the limit moves to the next line, so lines can be shorter than N but never longer, unless a single word is longer than N. Plain-text email is traditionally wrapped at 72–78 characters.
Add a break every N words starts a new line after every N words: with N = 4, one two three four five six seven eight nine becomes three lines, one two three four, five six seven eight and nine.
Add a break after punctuation starts a new line after each ., ! or ? (edit the list under Break after these characters). Closing quotes and brackets stay with their sentence. Abbreviations such as “e.g.” also get a break, so check the result.
Why PDF text has broken lines
A PDF stores text as lines placed at fixed positions on a page, not as flowing paragraphs. When you copy from it, most viewers put a line break at the end of every visual line, so sentences arrive cut into pieces. Words hyphenated at the end of a line arrive as exam-, a break, then ple.
Tick Rejoin words split by a hyphen at line ends to put them back together. It only joins when the next line starts with a lowercase letter, but it can't tell a real compound word that happened to fall at a line end (well- / known) from a split word, so leave it off for text with many hyphenated compounds.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
