Remove Line Breaks
Paste text that was copied out of a PDF, a plain-text email or a terminal and get it back without the hard line breaks. Choose one continuous line, or keep the blank lines between paragraphs.
Text copied from a PDF carries a line break wherever the page happened to wrap, which is why it arrives in a chat box or a document as a ragged column. This tool removes those breaks, trims the stray spaces they leave behind and drops empty lines, so the text reads the way it was written.
Want the line order flipped instead? Reverse lines
Line Break Removal Examples
Each output below is produced by the same code as the tool. The last rows use Keep paragraphs, which joins lines but leaves a blank line between paragraphs.
| Input | Output | What it shows |
|---|---|---|
| This sentence was copied from a PDF and broke at every line of the page. | This sentence was copied from a PDF and broke at every line of the page. | The basic case: three wrapped lines become one sentence. |
| Hi Sam, Thanks for the notes. I will send the draft on Friday. | Hi Sam, Thanks for the notes. I will send the draft on Friday. | One-line mode joins everything, including the greeting. |
| apples bananas cherries | apples bananas cherries | A list becomes space-separated words on one line. |
| line one line two | line one line two | Spaces left at the start and end of each line are trimmed, so no double gap appears at the join. |
| first second third | first second third | Windows CRLF endings are removed cleanly with no stray carriage returns. |
| First paragraph, wrapped across two lines. Second paragraph, also wrapped. | First paragraph, wrapped across two lines. Second paragraph, also wrapped. | Keep paragraphs: lines inside each paragraph join, and the blank line between paragraphs stays. |
| One Two | One Two | Several blank lines in a row collapse to a single paragraph break. |
| a hyphen- ated word | a hyphen- ated word | Hyphens are kept as typed. A word split with a hyphen at a line end needs a manual fix. |
How the Line Break Remover Works
Removing line breaks sounds like a single find-and-replace, but a naive replace leaves double spaces and empty gaps behind. These are the steps the tool takes instead.
Every kind of line ending is recognised
Windows uses a carriage return plus a line feed (CRLF), older Mac files use a lone carriage return and everything else uses a line feed. All three count as one break, so text from any system is handled the same way.
Each line is trimmed before joining
Wrapped text often carries a space at the end of one line or indentation at the start of the next. Trimming both ends of every line means each break is replaced by exactly one space.
Empty lines are dropped
In one-line mode, blank lines carry no text, so they are removed rather than turned into extra spaces. Use Keep paragraphs if those blank lines mark paragraphs you want to keep.
Keep paragraphs splits on blank lines first
Any run of two or more line breaks, even with spaces between them, is treated as a paragraph break. The lines inside each paragraph are joined, then the paragraphs are put back together with one blank line between them.
One Line, Keep Paragraphs or Reverse Lines?
Three ways to deal with a multi-line block. The same two short paragraphs show what each one does.
Shared input: Notes copied from a wrapped PDF page. A second short paragraph.
| Transformation | Result | Reach for it when |
|---|---|---|
| One line | Notes copied from a wrapped PDF page. A second short paragraph. | You are pasting into a single-line field, a spreadsheet cell or a search box. |
| Keep paragraphs | Notes copied from a wrapped PDF page. A second short paragraph. | You want readable paragraphs back in a document or email. |
| Reverse lines | paragraph. A second short wrapped PDF page. Notes copied from a | You want to keep every line but flip their order, such as a log or a list. |
Things to Check After Removing Line Breaks
The tool only removes breaks. It does not rewrite your text, so a few artefacts from the source document can survive the join.
Hyphenated line ends stay hyphenated
A PDF that split "information" as "infor-" and "mation" comes back as "infor- mation". Removing the hyphen automatically would also break genuine hyphenated words, so the tool leaves it alone. Search the output for "- " to find them.
Lists lose their structure
A bulleted or numbered list joined into one line reads as one long run of items. If you only want the list in a different order, reverse lines keeps every line intact.
Single-line paragraphs need a blank line to survive
Keep paragraphs relies on blank lines. If the source puts each paragraph on its own line with no gap, there is no way to tell a paragraph break from a wrap, so both get joined.
Spaces inside a line are not touched
Only the whitespace at line ends is trimmed. Double spaces or tabs in the middle of a line pass through unchanged, so the tool never alters text that was not caused by a line break.
Where Unwanted Line Breaks Come From
The breaks are rarely in the original writing. They are added by the program that displayed or exported the text.
PDF files
A PDF stores text line by line as it was laid out on the page, so copying a paragraph gives you one line per printed line. This is the most common reason people need a line break remover.
Plain-text email
Plain-text email is often wrapped at around 72 characters per line, and replies add their own wrapping on top. Keep paragraphs restores the original paragraphs from a quoted message.
Microsoft Word
Word can do this with Find and Replace by searching for ^p (paragraph mark) or ^l (manual line break). Pasting here is quicker when you also need the stray spaces cleaned up.
Excel and spreadsheets
Cells with line breaks paste as several lines. In Excel you can also use =SUBSTITUTE(A1,CHAR(10)," ") on a cell, or join the text here when it came from somewhere else.
When to Remove Line Breaks
Quoting a PDF
Paste a passage from a report or paper into a document, chat or citation without the ragged right edge.
Filling a single-line field
Forms, spreadsheet cells and search boxes often keep only the first line of pasted text. Joining it first keeps the whole thing.
Cleaning up captions and bios
Text drafted in a notes app can carry breaks that look wrong once posted. Join the lines, then add back only the breaks you meant.
Preparing text for other tools
Translation tools, word counters and text-to-speech read hard-wrapped text more naturally once each sentence is on one line.
Frequently Asked Questions
Paste the text into the box above. With One line selected, every line break is removed and the lines are joined with a single space. Copy the result when it looks right.
Yes. Select Keep paragraphs. Lines inside each paragraph are joined, and any blank line between paragraphs is kept as one paragraph break.
A PDF records where each printed line starts and ends, not where the paragraphs are. Copying text out of it therefore gives you a line break at the end of every printed line.
It removes the spaces left at the start and end of each line, so joins never produce a double space. Double spaces in the middle of a line are left as they are.
The hyphen is kept, so "exam-" followed by "ple" becomes "exam- ple". Removing it automatically would also damage real hyphenated words, so check the output for a hyphen followed by a space.
No. The line breaks are removed by code running in your browser. The text you paste is not sent to a server.
Related Text Tools
Invisible Character
Copy blank text and invisible characters, or find hidden ones in pasted text.
Character Map
Every Unicode substitute used by the flip and mirror tools, with code points.
Backwards Text Generator
Turn any sentence into backwards text, character by character.
Upside Down Text Generator
Flip text 180° with rotated Unicode lookalikes.
Mirror Text Generator
Create reflected text that reads like a mirror image.
Case Converter
Switch between six letter cases from a single input box.
Uppercase Converter
Convert text to ALL CAPS without retyping it.
Bold Text Generator
𝗕𝗼𝗹𝗱, 𝐬𝐞𝐫𝐢𝐟 and 𝙞𝙩𝙖𝙡𝙞𝙘 bold for bios and captions, copy-ready.