Remove Line Breaks
Join broken lines from PDFs into clean paragraphs, or a comma-separated list
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Paste the text into Text with unwanted line breaks. Try text copied from a PDF shows a typical example.
- Choose a mode: Keep paragraphs joins the lines inside each paragraph, One paragraph joins everything, and Separator puts a space, a comma or your own text where each break was.
- Leave Collapse repeated spaces on to tidy double spaces. Turn on Join words split with a hyphen if the PDF broke words across lines, like “exter- nal”.
- Check the number of line breaks removed, then copy the Result or save it as a .txt file.
Remove line breaks from text copied out of a PDF
Copy a paragraph from a PDF, such as a circular, a court order, a research paper or an e-book, and paste it into an email or a Word file, and you usually get a mess: every line ends where it ended on the PDF page, so the text breaks in odd places. This remove line breaks tool joins those lines back into proper paragraphs. It also works for text from old emails, subtitles and websites that wrap lines with hard returns. It runs in your browser, so the text isn't uploaded.
Why PDFs do this
A PDF stores where each line of text sits on the page, not where a paragraph begins and ends. When you copy from it, most PDF readers put a line break at the end of every printed line. Word processors and websites then treat each of those breaks as a new line. The text was never broken; the page layout was simply copied along with it.
The three modes
| Mode | What happens | Good for |
|---|---|---|
| Keep paragraphs | Lines inside a paragraph are joined with a space. A blank line still starts a new paragraph. | Articles, notices and chapters with several paragraphs |
| One paragraph | Every line break is replaced by a space, blank lines included. | A single quote, an abstract, a form field that won't accept new lines |
| Separator | Each line becomes one item, joined with a space, a comma or text you choose. Blank lines are skipped. | Turning a column of names or IDs into “A, B, C” for an email or a SQL query |
A worked example
This text was copied from a two-column PDF:
nal benchmark, which is often the repo
rate itself.
With “Keep paragraphs” and “Join words split with a hyphen” on, the result is one clean sentence: “Banks link most floating-rate retail loans to an external benchmark, which is often the repo rate itself.” Two line breaks are removed and the broken word “exter- nal” becomes “external”.
The hyphen option only joins a word when the line ends in a letter followed by a hyphen and the next line starts with a small letter. That protects names and real compound words that start with a capital, but it can't tell “well-known” split at the hyphen from “exter-nal” split by the PDF. Both would be joined, giving “wellknown”. Leave the option off for text with many hyphenated words, or read the result once.
Turning a list into one line
The separator mode is useful beyond PDFs. Paste a column of 50 roll numbers copied from Excel, choose “Comma”, and you get “101, 102, 103…” ready to paste into a message to a class teacher. Choose “Custom” and type something like ', ' to build the inside of a SQL IN ( ) list, or | for a pipe-separated line. The custom separator is used exactly as typed, spaces included.
Tips
- Spaces at the start and end of each line are always removed before lines are joined, so you don't get double spaces where the lines meet.
- “Collapse repeated spaces” also cleans the gaps that justified PDF text leaves between words.
- Headings copied from a PDF will be joined to the paragraph below them unless there was a blank line between them. Add a blank line after headings before you paste if you want to keep them separate.
- All kinds of line break are handled: Windows (CR LF), Mac and Linux (LF), and the older Mac style (CR).