# How to remove line breaks from text copied from a PDF or email: join lines into one paragraph or a comma-separated list

> Copy a paragraph out of a PDF and every line ends in a hard break, so it will not reflow. Here is how to join the lines into clean text, how to keep real paragraph breaks, how to turn a list into one comma-separated line, and the few things the tool deliberately does not fix (hyphenated words, bullets and stray spaces).

Published 2026-10-23 by Toolcloak. 6 minute read. Original: https://toolcloak.com/articles/how-to-remove-line-breaks-from-text-copied-from-a-pdf-or-email-join-lines-into-one-paragraph-or-a-comma-separated-list
Related free tool: [Line Break Remover](https://toolcloak.com/tools/remove-line-breaks)

You copy a paragraph from a PDF, paste it into an email or a form, and it comes out as a ragged column of short lines, each one ending where the PDF’s line ended. The text will not flow, and fixing it by pressing Delete at the end of every line is miserable. The [Line Break Remover](https://toolcloak.com/tools/remove-line-breaks) joins them in one click. The useful part is knowing its two options, because they decide whether you get one block, a set of paragraphs, or a comma-separated list.

> **In short**
> - Paste the text, choose what should **replace each break** (Space is the default), and press **Remove Line Breaks**.
> - Other replacements: **Nothing**, **Comma + space**, **Comma**, **Pipe** and **Semicolon**. That last group turns a list into one line.
> - Turn on **Keep paragraph breaks (blank lines)** to join the lines inside each paragraph but keep the gaps between paragraphs.
> - Each line is **trimmed**, and **blank lines are dropped** (unless you keep paragraphs). It does not mend words split by a hyphen at the end of a line.
> - The result shows **Lines joined**, the number of non-empty lines that went into it.

## Why copied text arrives broken

A PDF does not store a paragraph. It stores each printed line as its own piece of text, placed at a position on the page. When you copy it, the line ends come along as line breaks, so the text no longer flows when the box gets wider or narrower. Emails have a similar habit: some older systems add a break after about 70 characters. Both leave you with text that is correct word for word but laid out wrongly.

A line break is just an invisible character. The tool treats Windows breaks and ordinary breaks the same, so text from any source is handled. If what you really need is the whole PDF in an editable form, the [PDF to Word guide](https://toolcloak.com/articles/pdf-to-word-why-the-layout-breaks-text-pdf-against-scanned-pdf-and-how-to-get-editable-text-out) covers that route, and the [OCR guide](https://toolcloak.com/articles/how-to-copy-text-from-an-image-or-screenshot-ocr-in-english-hindi-and-other-languages) covers text that is trapped in a picture.

## How to use it, step by step

1. Open the [Line Break Remover](https://toolcloak.com/tools/remove-line-breaks) and paste the text. **Try a sample** fills in a short example.
2. Under **Replace breaks with**, pick **Space** for normal prose, or a separator if you are building a list.
3. Tick **Keep paragraph breaks (blank lines)** if the text has several paragraphs and you want them to stay separate.
4. Press **Remove Line Breaks**.
5. Check the result, then **Copy** it or **Download** it.

Try it: [Line Break Remover](https://toolcloak.com/tools/remove-line-breaks). Paste text with unwanted line breaks, choose what replaces them, and press Remove Line Breaks.

On the sample text, the four lines “This sentence was / broken into many / short lines when it / was copied from a PDF.” become one sentence, and the Lines joined count shows 4.

## The six replacement choices

| Replace breaks with | What you get | Best for |
| --- | --- | --- |
| Space (default) | Lines run together with one space between them | A paragraph copied from a PDF or email |
| Nothing | Lines are glued together with no gap at all | A long code, URL or number that was split across lines |
| Comma + space | item one, item two, item three | Turning a list into a sentence or a tag field |
| Comma | item one,item two,item three | Pasting into a form or tool that wants no spaces |
| Pipe | item one | item two | item three | Menu-style separators and spreadsheet notes |
| Semicolon | item one; item two; item three | Lists where the items themselves contain commas |

*The separator goes only between lines, never at the start or the end, so you do not get a stray comma after the last item.*

> **Be careful with “Nothing”:** It glues lines with no space at all. That is perfect for a web address that a PDF split across two lines, and a disaster for ordinary sentences, where “was” and “copied” would become “wascopied”. Use it only for text that was one unbroken string to start with.

## Keeping the paragraphs

Without the paragraph option, the tool removes **every** break, including the blank lines between paragraphs, so a whole page becomes one block. That is right for one paragraph and wrong for a document. With **Keep paragraph breaks** on, it splits the text wherever there is a blank line, joins the lines inside each paragraph, and puts a blank line back between paragraphs.

**The same two paragraphs, two settings**

| Keep paragraphs off | Keep paragraphs on |
| --- | --- |
| One block | Paragraphs kept |
| Every line break and blank line is removed | Lines inside a paragraph are joined |
| Both paragraphs merge into one long run | A blank line stays between paragraphs |
| Fine for a single paragraph | Best for a page or an email |

*If the result still merges paragraphs, the gap between them is probably not truly empty. See the tip below.*

> **When a paragraph break does not survive:** The tool looks for two or more line breaks in a row. If the gap between your paragraphs contains a space or a tab, it does not look empty to the tool, and the paragraphs are joined anyway. Clear those hidden spaces first with the [Whitespace Cleaner](https://toolcloak.com/tools/whitespace-cleaner), then run the tool again.

## What the tool trims and what it leaves

Before joining, each line has the spaces at its start and end removed, and lines that are empty are dropped. That is what stops you getting double spaces where a line used to end. What it does **not** touch is anything inside a line.

**Things it does not fix**

| Box | What it means |
| --- | --- |
| Hyphenated words | A word split as “inter-” on one line and “national” on the next becomes “inter- national” with a space. Search for “- ” afterwards and fix those few by hand. |
| Bullets and numbers | Bullet signs and list numbers copied from a PDF stay in the text, so a list will read “• one • two • three”. Remove them first if you do not want them. |
| Double spaces inside a line | Spaces within a line are left alone. If the PDF used wide gaps, clean them with the [Whitespace Cleaner](/tools/whitespace-cleaner). |
| Page numbers and headers | A page number or running header that was copied with the text is just another line, so it joins the sentence. Delete it before you paste. |

*None of these are faults. Each needs a human to decide, so the tool leaves the text as it was.*

## Turning a list into one line

This is the second big use. A column of items, such as email addresses, tags, names or product codes, often has to go into a single field that wants them separated by commas. Paste the column, choose **Comma + space** (or **Comma** for no spaces), and press the button. The result is the whole list on one line.

| You paste (one per line) | Choice | You get |
| --- | --- | --- |
| red / green / blue | Comma + space | red, green, blue |
| red / green / blue | Comma | red,green,blue |
| red / green / blue | Pipe | red | green | blue |
| red / green / blue | Semicolon | red; green; blue |
| red / green / blue | Space | red green blue |

*The slash stands for a line break. Blank lines in the list are ignored, so a gap in the middle does not leave an empty item.*

If the list has repeats, clean it first with the [Duplicate Line Remover](https://toolcloak.com/tools/remove-duplicate-lines) (see its [guide](https://toolcloak.com/articles/remove-duplicate-lines-how-to-clean-a-list-of-emails-names-or-keywords-and-what-ignore-case-and-trim-spaces-really-do)), and put it in order with the [Line Sorter](https://toolcloak.com/tools/line-sorter) before you join it. The tool does not put quotation marks around items, so if a database or a script needs each item in quotes, add them first, for example with a find-and-replace. For data that must keep proper quoting, the guide to [CSV to JSON](https://toolcloak.com/articles/csv-to-json-how-to-convert-with-commas-quotes-and-line-breaks-inside-fields-and-the-mistakes-that-corrupt-data) explains the traps.

## A quick checklist after joining

- **Read the first and last sentence.** A missing space or a glued word shows up there first.
- **Search for “- ”** (a hyphen followed by a space) to find split words.
- **Check the length** if the text has a limit, with the [Word Counter](https://toolcloak.com/tools/word-counter) and the [guide to word and character limits](https://toolcloak.com/articles/how-long-is-long-enough-a-field-guide-to-word-and-character-limits).
- **Fix capital letters** if the PDF shouted in upper case, using the [Case Converter](https://toolcloak.com/tools/text-case-converter).
- **Keep the original** until you have compared the two. The tool changes only what you pasted, but you cannot undo a copy over the top of your source.

Privacy: the joining happens in your browser, and Toolcloak does not receive the text. That matters for contracts, letters and anything else you copy out of a private PDF.

## Frequently asked questions

### How do I remove line breaks from text?

Open the Line Break Remover, paste your text, leave Replace breaks with on Space and press Remove Line Breaks. The lines are joined into one paragraph that you can copy.

### Text ek line mein kaise kare?

Line Break Remover kholiye, text paste kijiye, Replace breaks with mein Space rakhiye aur Remove Line Breaks dabaiye. Saari lines ek paragraph mein jud jayengi. Paragraphs alag rakhne ho to Keep paragraph breaks on kijiye.

### How do I keep paragraphs but remove the other breaks?

Tick Keep paragraph breaks (blank lines). The tool then joins the lines inside each paragraph and keeps a blank line between paragraphs. The gap must be truly empty, with no spaces in it.

### How do I turn a list into a comma-separated line?

Paste the list with one item per line, choose Comma + space as the replacement, and press the button. You get all the items on one line, separated by commas, with no comma after the last item.

### Why is there a space in the middle of a word?

The word was split with a hyphen at the end of a line, such as inter- and national. The tool joins the lines with a space and does not repair split words. Search for a hyphen followed by a space and fix them by hand.

### Why did my paragraphs merge even with Keep paragraph breaks on?

The gap between them probably holds a space or tab, so it is not a truly empty line. Clear hidden spaces with a whitespace cleaner first, then run the tool again.

### Does it remove double spaces inside a line?

No. It trims the spaces at the start and end of each line and drops empty lines, but spaces inside a line are left as they are. Use a whitespace cleaner for those.

### Is my text uploaded?

No. The text is joined in your browser and Toolcloak never receives it, so it is safe to use on private letters and contracts.

