How to remove line breaks in Excel and Word
Updated November 24, 2026
In Excel, select the cells, press Ctrl+H, press Ctrl+J in the Find what box, type a space in Replace with and click Replace All. With a formula, use =SUBSTITUTE(A2,CHAR(10)," ") in another column. In Word, open Replace (Ctrl+H) and replace ^p (paragraph mark) or ^l (manual line break) with a space.
Remove line breaks in Excel with a formula
A line break inside an Excel cell, the one you type with Alt+Enter, is the character CHAR(10). Replacing it with a space keeps the words apart, and TRIM removes the double spaces that may follow. Text pasted from other systems can also contain CHAR(13), which this formula removes too.
- Type the formula below in B2, next to the first cell to clean.
- Double-click the fill handle to copy it down the column.
- Copy column B, then use Home > Paste > Paste Values to keep the text without the formula.
- Delete the original column if you no longer need it.
=TRIM(SUBSTITUTE(SUBSTITUTE(A2,CHAR(13),""),CHAR(10)," "))
Good to know : CLEAN(A2) also removes line breaks, but without adding a space: “first line” and “second line” become “first linesecond line”. Use SUBSTITUTE when the lines hold separate words.
Remove line breaks in a whole Excel column with Find and Replace
- Select the column or the range to clean.
- Press Ctrl+H to open Find and Replace.
- Click in Find what and press Ctrl+J once. The box looks empty, which is normal.
- Type a space in Replace with.
- Click Replace All.
- If the rows stay tall, turn off Home > Wrap Text and use Home > Format > AutoFit Row Height.
Good to know : If Excel finds nothing, the Find what box may contain two Ctrl+J characters or a leftover space. Clear it with Backspace and press Ctrl+J only once.
Excel for Mac and Google Sheets
On a Mac, the SUBSTITUTE formula above works exactly the same way in recent versions of Excel. Many Mac users report that Ctrl+J does nothing in the Replace dialog, so the formula is the safer method there.
In Google Sheets, the same SUBSTITUTE formula works, or use REGEXREPLACE. To clean cells in place without a formula, use Find and replace with regular expressions.
- Select the cells and choose Edit > Find and replace.
- Type \n in Find.
- Type a space in Replace with.
- Tick Search using regular expressions, then click Replace all.
Remove line breaks in a Word document
Word has two kinds of breaks: the paragraph mark, created by Enter, and the manual line break, created by Shift+Enter. Click the ¶ button on the Home tab to see which one your text uses.
- Press Ctrl+H to open Find and Replace.
- In Find what, type ^p for paragraph marks or ^l for manual line breaks. You can also click More, then Special, and pick them from the list.
- Type a space in Replace with.
- Click Replace All.
- To join broken lines but keep real paragraphs, replace ^p^p with a marker such as ###, then ^p with a space, then ### with ^p.
- On a Mac, open Edit > Find > Advanced Find and Replace: ^p and ^l work the same way.
Remove extra line breaks in Outlook
Classic Outlook for Windows can remove extra line breaks from received plain-text emails by itself. The setting is in File > Options > Mail, under Message format: Remove extra line breaks in plain text messages. When Outlook has removed some, a notice at the top of the message lets you restore them.
In an email you are writing in classic Outlook, the Replace command of the Format Text tab accepts ^p and ^l as in Word. The new Outlook does not have all these options.
Common problems
- Words are glued together: the breaks were replaced with nothing. Replace them with a space instead.
- Double spaces appear: wrap the result in TRIM in Excel, or replace two spaces with one in Word until nothing is found.
- The cell still shows several lines: Wrap Text is still on, or the cell holds CHAR(13). Use the formula with both characters.
- Text from a PDF keeps words split by a hyphen, such as “re-” and “gions”: Word and Excel do not rejoin them. Search for the hyphen followed by a space and check each one.
Remove line breaks online with Utiloz
For text copied from a PDF or an email, the Utiloz line break remover joins the lines while keeping paragraphs separated by an empty line, and rejoins words split by a hyphen at the end of a line. It can also put everything on one line or join the lines with a separator of your choice, such as a comma or a tab. The text stays in your browser.
Its limits: paragraphs are only recognized by an empty line, so a PDF without empty lines gives a single block, and real compound words split at a line end lose their hyphen. It cleans pasted text, not Excel cells in place.
Frequently asked questions
What is CHAR(10) in Excel?
It is the line feed character, the one Excel inserts when you press Alt+Enter in a cell. SUBSTITUTE(A2,CHAR(10)," ") replaces it with a space.
How do I remove all line breaks in Word at once?
Press Ctrl+H, type ^p in Find what, a space in Replace with and click Replace All. Repeat with ^l for manual line breaks.
Why does Ctrl+J not work in Excel Find and Replace?
The box must contain only that character: clear it first and press Ctrl+J once. On a Mac, use the SUBSTITUTE formula instead.
How do I replace line breaks with commas in Excel?
Use =SUBSTITUTE(A2,CHAR(10),", ") or type a comma and a space in Replace with after pressing Ctrl+J in Find what.