← All TOOLZORQ tools · More guides
Short answer: paste the ragged text into a line-break remover and join the single line breaks into spaces, while keeping blank lines as paragraph breaks. TOOLZORQ's free Text Cleaner does exactly that in your browser: paste the text, press Clean text, and copy the result — your text is never uploaded anywhere.
You copy a paragraph from a PDF, paste it into your document, and instead of a paragraph you get a staircase: every line ends after a few words, the sentences are chopped in half, and the text will not reflow no matter how wide you make the window. The same thing happens with text copied from some emails, web pages, and chat apps. The words are all there, but the shape is wrong, and fixing it by hand — deleting one break at a time — is slow, boring work that invites mistakes. This guide explains why copied text arrives broken, how to fix it in seconds with TOOLZORQ's Text Cleaner, and how to do the same job in Word, Excel, Google Docs, and a text editor when that is more convenient.
A PDF does not store text the way a word processor does. A document stores paragraphs: a run of words that flows from line to line, with a paragraph mark only where one paragraph ends and the next begins. A PDF stores text by position on the page: each line is a set of words placed at a particular spot, because the PDF's job is to make the page look the same everywhere, not to remember how the sentences were written. When you copy text out of a PDF, the app that does the copying has to guess where the sentences are, and most of the time it simply inserts a line break at the end of every printed line — even when that line ends in the middle of a sentence.
The result is a paragraph that has been sliced into short lines for no reason. Paste it into Word or an email and the slices stay, because the line breaks are real characters in the pasted text, not a display setting. Widening the window does nothing. Changing the font does nothing. The only fix is to remove the breaks that do not belong there, which means telling something — a tool, or a find-and-replace — which breaks are real paragraph breaks and which are just the edges of the printed page.
Emails cause the same problem in a different way. Many email apps wrap long lines at a fixed width when they send a message, inserting a hard line break every seventy or eighty characters. The reader never notices, because their email app reflows the text. But copy that message into another app and the wrapping shows up as short lines, exactly like a PDF. Web pages can do it too, when text is copied out of a table cell, a sidebar, or a chat bubble that forced the words into a narrow column.
A line break is a hidden character that tells a program to start a new line. It carries no visible mark, which is why broken text is so confusing to look at: the text looks as if it should flow, but it does not, and the reason is invisible. There are two kinds worth knowing about. A hard line break is a real character in the file, inserted when you press Enter, or when an export writes one at the end of a printed line. A soft line break, or wrap, is not a character at all: it is the program deciding on the fly that the next word does not fit and moving it down. Soft breaks disappear when you widen the window; hard breaks do not.
Computers have used more than one character for a hard break over the years, which is part of the mess. Windows uses two characters together, a carriage return followed by a line feed (CRLF). Mac and Linux use a line feed alone (LF). Older Macs used a carriage return alone. Most modern tools read all of them without complaint, but when you are fixing breaks yourself with find-and-replace, the difference matters: a search for one kind of break will miss the other, and a file that travelled between systems can contain both. A good cleaning tool handles all three without asking you to know which one you have.
The other distinction that matters is between a line break and a paragraph break. In most documents, a paragraph break is a blank line — two line breaks in a row — while a single line break inside a paragraph is just a wrapped line. That difference is the key to cleaning text safely: join the single breaks into spaces, and leave the double breaks alone. A tool that joins every break, single and double, turns your whole document into one giant paragraph. A tool that only joins single breaks gives you flowing paragraphs with the paragraph structure intact.
TOOLZORQ's Text Cleaner is built for exactly this job. It joins the broken lines back into flowing paragraphs, in your browser, with nothing uploaded — your pasted text never leaves your device. It works in three steps, and the whole clean takes seconds.
Here is what the clean looks like on a real example. Text copied from a PDF often arrives like this:
The quick brown fox jumps
over the lazy dog. The fox
was in a hurry, and the dog
was asleep in the sun.
The next morning, the fox
came back with a friend.
After cleaning, the same text reads as normal paragraphs:
The quick brown fox jumps over the lazy dog. The fox was in a hurry, and the dog was asleep in the sun.
The next morning, the fox came back with a friend.
Notice what happened and what did not. The single breaks inside each paragraph became spaces, so the sentences flow. The blank line between the two paragraphs stayed, so the two paragraphs are still two paragraphs. The words themselves did not change, and no words were joined together without a space — "jumps" and "over" are still two words, because the break between them became a space, not nothing.
Before you paste: check where the text is going. If you paste cleaned text into Word or Google Docs with normal paste, the formatting of the source can come along with it — font, size, colour. Paste with Ctrl + Shift + V (or Cmd + Shift + V on a Mac) to paste plain text only, so the words take on the formatting of your document instead of bringing the PDF's formatting with them.
The Text Cleaner is the right tool when the text is prose that should flow: paragraphs from a report, an article, a book, an email, or a set of notes. It is also right for text copied from a web page that arrived with stray breaks, and for text pasted out of a chat app where every line was sent as its own message. In all of these cases the breaks are accidents of layout, and joining them restores the text to what the writer intended.
There are cases where you should not join the breaks, because the breaks are the content. A poem's line breaks are deliberate: joining them turns verse into prose. A list with one item per line should stay a list — joining it turns ten items into one long sentence. An address, a piece of code, a table copied as text, and a song lyric all rely on their line breaks to make sense. If the breaks carry meaning, leave them alone, or clean only the part of the text that is prose and leave the rest as it is.
The other case to watch for is a PDF that was scanned from paper rather than made from a document. A scanned PDF has no text in it at all — it is a picture of a page — so copying from it gives you nothing to paste. The Text Cleaner cannot help there, because there is no text to clean. What you need first is OCR, software that reads the words out of the image, and only then can the line breaks be cleaned. If your PDF will not let you select any text at all, it is almost certainly a scan, and OCR is the missing step.
| Kind of text | Clean it? | Why |
|---|---|---|
| Paragraphs from a PDF or report | Yes | The breaks are printed line edges, not real breaks. |
| An email that arrived hard-wrapped | Yes | The breaks are the sender's line width, not yours. |
| Text copied from a web page or chat | Yes | Stray breaks come from the column or bubble width. |
| A poem or song lyric | No | The line breaks are part of the writing. |
| A list, one item per line | No | Joining turns the list into one sentence. |
| Code, an address, or a table | No | The breaks carry the structure. |
| A scanned PDF (no selectable text) | Not yet | There is no text to clean — OCR comes first. |
If the text is already in Word, you can fix it there with Find and Replace — no extra tool needed. Word uses two special codes in its Find and Replace box: ^l (a caret followed by a lowercase L) finds a manual line break, and ^p finds a paragraph mark. The trick is to use them in the right order, because if you replace all the paragraph marks first, you lose the information about where the paragraphs were.
The safe two-pass method is: first protect the real paragraph breaks, then join the single breaks, then restore the paragraphs. Press Ctrl + H to open Find and Replace. Replace every paragraph mark (^p) with a placeholder that does not appear in your text, such as @@@. Then replace every manual line break (^l) with a single space. Then replace the placeholder (@@@) back to a paragraph mark (^p). The paragraphs come back exactly where they were, and the wrapped lines are joined. Always work on a copy of the document first, because Replace All cannot be undone in stages if you pick the wrong placeholder.
There is one more detail to check after the replace: double spaces. If a line in the original ended with a space and the next line began with one, joining them with a space of your own leaves two spaces in a row. A final pass replacing two spaces with one, repeated until Word reports no more replacements, tidies that up. Word's Find and Replace also has a "Use wildcards" mode that can do the whole job in fewer steps, but the two-pass method above works with wildcards off, which makes it easier to follow and harder to get wrong.
In Excel, line breaks inside a cell are a different problem with a different fix. A cell can hold several lines, separated by line breaks that were typed with Alt + Enter or pasted in from elsewhere. To remove them, select the cells, press Ctrl + H to open Find and Replace, click into the "Find what" box, and press Ctrl + J. That inserts a line-feed character into the box — you will not see anything, but it is there. Leave "Replace with" as a single space, or empty if you want the lines joined with nothing between them, and click Replace All. The lines inside each cell join together, and the cells stay separate.
Google Docs has no ^l code, but its Find and Replace supports regular expressions. Press Ctrl + H, tick "Match using regular expressions", and search for \n to find line breaks. The same two-pass idea applies: protect the paragraph breaks first, join the single breaks, then restore the paragraphs. Docs is more limited than Word here, because its regular-expression replace treats each match on its own and cannot easily tell a single break from a double one in one pass. For a long document, pasting the text through the Text Cleaner first and then into Docs is usually faster than fighting with the regex box.
If you work with plain text, a code editor such as VS Code or Notepad++ does the job with regular expressions, and the same two-pass idea works there too. First, protect the paragraph breaks: replace two line breaks in a row with a placeholder. In regex terms, search for \r?\n\r?\n — which matches a blank line whether the file uses Windows or Unix line endings — and replace it with something like @@@PARA@@@. Then replace every remaining single line break, \r?\n, with a single space. Then replace the placeholder with a blank line again. Collapse any double spaces with a final pass.
The placeholder step is what makes this safe. Without it, a single replace of every line break with a space destroys the paragraph structure along with the wrapped lines, and there is no way to get it back except by re-reading the text and re-inserting the breaks by hand. With it, the whole job is three replaces and takes under a minute. The same pattern works in any tool that supports regular expressions — a terminal, a script, or an online regex tester — and it is worth learning once, because ragged copied text is a problem that keeps coming back.
One warning applies to every method on this page: make a copy before you replace. Find-and-replace across a whole document is fast, which is both its advantage and its danger. A wrong pattern applied to the original is hard to undo cleanly, while the same pattern applied to a copy costs nothing if it goes wrong. Copy first, replace second, check the result, and only then replace the original.
Joining words without a space. The most common error is replacing a line break with nothing instead of a space, which glues the last word of one line to the first word of the next: "the foxwas in a hurry". Always replace with a single space, and check the result for glued words before you move on.
Collapsing the paragraphs. Replacing every break, single and double, turns the document into one unbroken block of text. Protect the paragraph breaks first, with a placeholder or with a tool that keeps blank lines, and the paragraphs survive.
Hyphenated words split across lines. PDFs often split a long word at the end of a line with a hyphen: "informa-" on one line and "tion" on the next. Joining the lines with a space leaves "informa- tion", with the hyphen still there and a space in the middle of the word. The clean fix is to remove the hyphen as well as the break when a line ends in a hyphen and the next line starts with a lowercase letter — but do it carefully, because a hyphen at the end of a line can also be a real hyphen in a compound word, and removing that one changes the meaning.
Trailing and double spaces. Lines copied from a PDF often end with a space, and joining them adds another. Collapse repeated spaces to one after the join, and trim the start and end of the cleaned text, so the result does not have a ragged edge of spaces.
Forgetting to check the result. Cleaning is a mechanical step, and mechanical steps make mechanical errors — a glued word here, a lost paragraph there. Read the cleaned text once, quickly, before you send it or publish it. The check takes a minute and catches the errors that the tool cannot see.
Paste the text into the Text Cleaner and press Clean text. It joins single line breaks into spaces and keeps blank lines as paragraph breaks, so the text reads as normal paragraphs. Then copy the cleaned text and paste it into your document with Ctrl + Shift + V to paste plain text only.
No. Only single line breaks are joined. A blank line between paragraphs is kept, so your paragraphs stay separate. Extra spaces inside lines are also collapsed to one, so the cleaned text has no double spaces left over from the join.
No. The Text Cleaner runs entirely in your browser — your pasted text never leaves your device. That matters when the text is private: a report, a contract, or a personal email can be cleaned without sending it to a server.
Yes. Open Find and Replace with Ctrl + H, replace paragraph marks (^p) with a placeholder first, then replace manual line breaks (^l) with a space, then replace the placeholder back to a paragraph mark. Work on a copy of the document, and do a final pass to collapse double spaces.
Joining the lines leaves the hyphen in place, as in "informa- tion". Remove the hyphen together with the break when a line ends in a hyphen and the next line starts with a lowercase letter, but check each one: a hyphen can also be part of a compound word, and removing that changes the meaning.
The PDF is probably a scan — a picture of a page with no text layer. Copying gives you nothing to clean, so the Text Cleaner cannot help yet. Run OCR software on the PDF first to read the words out of the image, and then clean the line breaks in the recognised text.