Free line break remover
Remove line breaks and get the paragraph back
Paste text that arrived chopped into short lines and this tool works out which breaks the layout imposed and which ones you meant, then removes only the first kind. Free, no signup, nothing capped however long the passage runs — and it settles the two questions a find-and-replace cannot: whether a space belongs where the break was, and what to do with a word the margin split across a hyphen. Blank lines between paragraphs stay put unless you ask for one continuous line.
- 100% free
- No signup
- Keeps paragraph breaks
- Mends hyphenated words
- Any length
How to remove line breaks from pasted text
Three steps, and the rejoined version appears before you have finished reading the options.
Drop the chopped-up passage into the top box
Select the text in the PDF, the email or the terminal window it came from and paste it in — the ⌘V shortcut (Ctrl+V on Windows) works while you are simply looking at this page, with no need to click into the box. Windows line endings, old Mac ones and the two rarer Unicode separators are all understood, so it does not matter what wrote the file.
Pick how ruthless to be about the breaks
The first setting is the useful one: it measures the width your source was wrapped at, then removes only the breaks that fall at that margin mid-sentence. Choose the second if your text already uses blank lines to mark paragraphs and you want everything between two of them flattened, or the third if you genuinely want a single unbroken line, which is what a spreadsheet cell or a search box needs.
Look at the hyphen count, then take the result
The highlighted note reports how many words were welded back across a hyphen and what column width was detected — if the width looks wrong, your source is probably a table rather than prose. Copy the rejoined text or save it as rejoined-text.txt, and check the word count tile: it should be identical before and after unless hyphenated fragments became whole words again.
Technical specifications
| Line endings understood | Windows CRLF, classic Mac CR, Unix LF, and the Unicode line and paragraph separators U+2028 and U+2029 — all normalised before anything is measured |
|---|---|
| How a wrapped break is identified | Three tests in order: the line ends with a hyphen; the next line opens with a lowercase letter, so it cannot be a new sentence; the line stopped without closing punctuation. Otherwise the line must reach within 6 characters of the measured column |
| How the column width is measured | The 90th percentile of the non-blank line lengths, not the maximum — one long heading or table row would otherwise drag the estimate 20 characters past the real margin |
| Hyphen repair | A trailing -, ‐, ‑ or soft hyphen followed by a lowercase letter is deleted and the halves are welded; followed by a capital, the hyphen is kept and the halves are joined without a space |
| When a space is inserted | In place of every removed break, unless the line already ended in whitespace, the next line began with it, or a hyphen was just repaired. Alternatives: nothing, a comma, a semicolon or a vertical bar |
| Paragraph handling | Blank lines survive as paragraph boundaries and are normalised to none, one or two gaps; runs of five blank lines collapse to the one you asked for |
| Length limit and speed | No cap. A 30-page report, roughly 1,200 lines, is rejoined in under 5 ms on a current laptop, and the result updates while you are still adjusting the options |
| Price and privacy | Free, no account; the passage is rejoined in this browser tab and never uploaded |
Frequently asked questions
Why does text copied out of a PDF break at the end of every line?
Because a PDF has no paragraphs in it — it stores each piece of text at a fixed position on the page, and copying reassembles those pieces row by row. What you see as a flowing paragraph is really 8 or 10 separate rows of glyphs that happen to sit under one another, so the copy hands you 8 or 10 lines with a break after each. Nothing in the file records that they belong to one sentence, which is why every PDF reader does this and why no setting turns it off. The first option above reconstructs the paragraphs by measuring where the margin was.
What happens to a word split across two lines by a hyphen?
It is put back together and the hyphen disappears, provided the next line starts with a small letter. Justified typesetting breaks long words at the margin — infor- on one row and mation on the next — and joining the rows naively leaves you with infor- mation or infor-mation, neither of which is a word. The rule this page applies is that a trailing hyphen followed by a lowercase letter was inserted by the layout, while a trailing hyphen followed by a capital belongs to a real compound like Anglo-Saxon and is kept. Untick the hyphen option if your source uses end-of-line hyphens for something else.
How does it decide which breaks to keep?
Three tests, applied to each break in turn. A line ending in a hyphen is always a wrap. A break is also a wrap when the following line cannot possibly start a sentence — it opens with a small letter — or when the line before it stopped without any closing punctuation. Failing all three, the line has to have run to within six characters of the measured column width to count as wrapped; a short line that ends in a full stop is the last line of a paragraph, and its break survives.
My text has no blank lines anywhere. Will the paragraphs still come out right?
Yes, and that is exactly the case the first option was built for. Text lifted from a PDF or a plain-text email usually has no blank lines at all, so the second option — which trusts blank lines to mark paragraphs — would flatten the whole passage into one block. The margin measurement does not need blank lines: it reads the length of every line, takes the ninetieth percentile as the column width, and treats short lines that close a sentence as paragraph endings.
How do I get everything on one single line?
Choose the third option, which removes every break including the blank lines between paragraphs. This is what you need for a spreadsheet cell, a database field, a search box or a CSV value, all of which treat a line break as the end of the record. Set the replacement to a comma and a space if the lines were really a list rather than prose — a column of names becomes a comma-separated sentence in one step.
Why do I sometimes end up with two spaces where one break was?
Because the line already ended with a space before the break, and adding another one on top gives you two. It happens constantly with text exported from email clients and word processors, which leave trailing spaces at the end of wrapped lines. Both defences are on by default: each line is trimmed before it is joined, and any run of spaces in the finished text is squeezed back to one. Turn them off only if the spacing inside your lines is meaningful, as it is in ASCII tables.
Does rejoining the lines change the words or the word count?
No — the word count tile under the tool is there to prove it, and it stays put. Line breaks are whitespace, and swapping whitespace for other whitespace leaves every word intact. The one exception is deliberate: repairing a hyphenated split turns two fragments into one word, so infor- plus mation drops the count by one and gives you the word you actually wrote.
Why a PDF hands you forty lines instead of one paragraph
A PDF does not contain paragraphs. It contains instructions of the form “draw these glyphs at this position”, laid out row by row for a page of a fixed size, and the concept of a sentence continuing past the right margin exists nowhere in the file. When you select a column of text and copy it, the reader does the only thing it can: it walks the rows in order and puts a line break between them. Forty rows of prose arrive as forty lines. This is not a bug in your PDF reader, and no export setting avoids it — the information needed to do better was thrown away when the document was typeset. Reconstructing the paragraph means guessing, and the guess that works is geometric: measure how wide the column was, and treat a line that ran all the way to that margin as one the layout cut rather than one the writer ended.
Justified typesetting adds a second injury. To keep both margins straight, the typesetter hyphenates long words at the break, so a word ends up as infor- at the end of one row and mation at the start of the next. Any tool that simply deletes the breaks hands you infor- mation, and any tool that deletes the breaks and the hyphens together destroys well-known and Anglo-Saxon along the way. The distinction this page draws is the one an editor would draw by eye: a hyphen at a margin followed by a small letter was put there by the layout engine, while a hyphen followed by a capital belongs to the word. Once the paragraph is whole again, the paragraph counter will finally agree with what you can see on the screen, which it never does while every line is counted as its own block.
PDFs are not the only offender. Plain-text email has hard-wrapped at 72 to 78 characters since the 1980s, because the standard requires lines short enough to survive any mail transport, so a forwarded message arrives pre-broken in the same way. Terminal output, code comments, subtitle files and anything that passed through an old content management system do the same. What all of them share is that the breaks encode a display width rather than a meaning, and once the text moves somewhere with a different width the breaks become nonsense. If the passage also came in carrying doubled spaces, curly quotes and stray invisible characters — the usual companions of a copy from a typeset source — the text cleaner handles those in the same pass as this one.
The passage you paste stays in this tab
Rejoining happens in JavaScript that was downloaded with the page, so the confidential report or unpublished chapter you paste is never sent to a server and never written to disk. There is nothing to sign in to and no history kept: reload and the boxes are empty again. The Save button builds the file inside the browser, which is why the download works the same on a train with no connection.