Remove Line Breaks and Rejoin Sentences
Text copied from a PDF, a plain-text email or a terminal is often hard-wrapped: each line ends where the page did, not where the sentence does. This tool will remove line breaks and turn those fragments back into continuous text.
Example
Input:
Text copied from a PDF often
breaks in the middle of
sentences like this.
A second paragraph
also wraps.
Output (keep paragraph breaks):
Text copied from a PDF often breaks in the middle of sentences like this.
A second paragraph also wraps.
Without paragraph mode, both paragraphs become a single line.
Options explained
- Space (default): each break becomes one space. Use this for prose.
- Nothing: lines are glued together directly. Useful for long URLs, keys or Base64 that were wrapped.
- Comma: each break becomes a comma and a space, so a column of values turns into
red, green, blue. - Custom text: any separator you type, such as
|, a semicolon orORfor building search queries. - Keep paragraph breaks: blank lines are treated as paragraph boundaries and kept as one blank line; only the breaks inside each paragraph are joined.
How spacing is handled
Spaces and tabs around each line break are absorbed, so you never get double spaces at the join. Several line breaks in a row are replaced by a single separator, and whitespace at the very start and end of the result is trimmed.
Common problems
- Hyphenated words. PDFs often split words with a hyphen at the end of a line. “infor-” followed by “mation” becomes “infor- mation” with a space, or “infor-mation” with nothing. Check such words, or fix them with the Text Replacer.
- Lists and headings. Bullet points and headings are joined into the surrounding text too. Remove those sections first or add blank lines around them and use paragraph mode.
- Comma mode after periods. A line ending in a period gets a comma as well, so “this.” becomes “this.,”. Use a space when joining full sentences.
Related tools
Multiline to Single Line offers quoting options for turning lists into code-ready values. After joining, Remove Extra Spaces tidies any leftover double spaces inside lines.
Recipes for common jobs
| Goal | Setting | Result |
|---|---|---|
IDs for an SQL IN clause | Comma | 101, 102, 103 → wrap in IN (…) |
| Quoted values for code | Custom text ', ' | a', 'b', 'c → add a quote at each end |
| Wrapped Base64 or a long URL | Nothing | One unbroken string |
| Search query from keywords | Custom text OR | red OR green OR blue |
| Poem or lyrics quoted inline | Custom text / | line one / line two |
For the Base64 and URL cases, make sure the lines do not end in trailing spaces you want to keep, since spaces around each break are absorbed during joining.
Privacy
The text stays in your browser while it is processed.