
Last checked by the TextEditor.com team
How to remove line breaks
Paste your text in the box. The result shows next to it right away. Choose which breaks stay, then press Copy text.
| Mode | What stays | Use it for |
|---|---|---|
| Keep paragraphs | The empty lines between paragraphs. Each paragraph becomes one line. | Most text from a PDF, an email or a web page |
| Keep paragraphs and lists | Paragraphs, plus lines that start with a bullet or a number, headings and short lines that end a sentence | Reports and articles with lists in them |
| One line | Nothing. All the text ends up on one line. | A form field, a spreadsheet cell, a list of names to put together |
Press Changes, next to Result, to see what moved. Red marks show the breaks that go, green marks show what took their place. Your text stays in the box, so you can switch modes as often as you like.
Why text from a PDF breaks at the end of every line

A PDF stores where each line sits on the page, not where a paragraph starts and ends. When you copy, every line comes with a line break at its end. That break was right for the page, but it is wrong in a chat or a document.
The same happens with text from old emails, subtitles and some web pages. Those line breaks are called hard breaks. A normal paragraph has none. Your screen wraps it to fit, which is called a soft wrap.
Printers set each line to fit
the page. When you copy it, the
break at the end of every line
comes with it, so the lines stay
this short or wrap in odd places.
Printers set each line to fit the page. When you copy it, the break at the end of every line comes with it, so the lines stay this short or wrap in odd places.
Move the slider. The text on the right wraps to fit any width. The text on the left keeps its breaks, so a narrow column chops it up and a wide one leaves gaps.
How the tool keeps your paragraphs
A paragraph ends with an empty line, which is two line breaks in a row. Keep paragraphs joins the lines inside each paragraph and leaves the empty lines alone. More than one empty line in a row becomes one.
A list has no empty lines between its items, so Keep paragraphs would glue them together. Keep paragraphs and lists checks each line: a break stays before a bullet or a number, after a colon, and after a short line that ends a sentence. This is the same rule the text cleaner uses for text from a PDF.
- apples
- bread
The market opens at 8 and closes
at noon, so we should leave
early.
A crossed out ↵ is a break that goes. A green dot is the space that takes its place. Breaks without a mark stay.
Words split with a hyphen at the end of a line
Books and PDFs often split a long word at the end of a line and add a hyphen. When the lines are joined, you get "exam- ple" with a space in the middle. The tool removes the hyphen and the break when the next line starts with a small letter.
| End of line, then next line | Result | Why |
|---|---|---|
| exam-↵ple | example | Small letter next, so the hyphen was only there to split the word |
| E-↵Mail | A capital letter next, so the hyphen stays | |
| well-↵known | wellknown | The tool cannot tell a split word from a word that always has a hyphen |
| well-↵known, with well-known on one line somewhere else in the text | well-known | The tool found the word with its hyphen in your text, so the hyphen stays |
| COVID-↵19 | COVID-19 | A digit next to the hyphen, so it stays |
| and/↵or | and/or | A slash or a long dash right after a word joins without a space |
| well-↵known, option off | well-known | The hyphen stays and the halves join without a space |
Words like well-known and long-term are the trap. The tool looks for each split word in the rest of your text. If it finds the word with a hyphen and never without one, the hyphen stays. Check the rest in the Changes view, or turn off "Rejoin words split with a hyphen" when your text has many of them.
Line breaks in emails
Plain text emails often break lines at about 72 to 78 characters. The email standard, RFC 5322, says a line must not be longer than 998 characters and should not be longer than 78. Many mail programs still follow the 78 rule when they send plain text.
Replies add a > mark at the start of each quoted line. Remove line breaks keeps those marks. The text cleaner has a "Remove email quote marks" option that takes them out first.
Remove line breaks in Word and Excel
In Microsoft Word, open Replace with Ctrl + H. Type ^p in Find what for a paragraph mark, or ^l for a line break made with Shift + Enter. Type a space in Replace with and press Replace All. This removes every break, paragraphs too, so keep paragraphs with this page instead.
In Excel, a line break in a cell is the character CHAR(10). This formula puts a space in its place:
=SUBSTITUTE(A1, CHAR(10), " ")
You can also open Replace in Excel and press Ctrl + J in the Find what box. That types a line break, which you cannot see.
Windows ends a line with two characters, a carriage return and a line feed (CRLF). Mac and Linux use only the line feed. This page treats both the same, and the old Mac carriage return too.
Which tool do you need?
| You want to | Use |
|---|---|
| Join broken lines, keep paragraphs, make one line | This page |
| Get the text out of a PDF file first | PDF to text |
| Fix hidden characters, odd spaces, HTML tags and fancy letters as well | Text cleaner |
| Replace a word with a line break, or add breaks every 80 characters | Find and replace |
| Put lines in order or remove repeated lines | Sort lines and remove duplicate lines |