How to remove line breaks in Word and Excel

Both apps can do it. Both hide the syntax you need in a help page nobody reads.

In Word, open Find and Replace and search for ^p to match a paragraph mark or ^l to match a manual line break, then replace it with a space. In Excel, press Ctrl+J inside the Find and Replace box to type the break character, or clean the cell with a CHAR formula. Both work. Both are slower than fixing the text before it arrives.

Word: two codes, and picking the wrong one wastes ten minutes

^p is a paragraph mark, the thing Return produces. ^l is a manual line break, the thing Shift+Return produces. They look identical on screen and Word treats them as different characters, which is why a replace that "does nothing" is almost always aimed at the wrong one.

Run both, in order. Replace ^l with a space first, then handle ^p. Text pulled out of a PDF or an email usually contains a mix, and the mix is invisible until you turn on formatting marks with ⌘8.

Keep your paragraphs. Replacing every ^p flattens the document into one block. Replace ^p^p with a placeholder such as @@, then replace the remaining single ^p with a space, then put @@ back as ^p^p. Three passes, no lost structure.

Klipto's cleaners run on the clip instead of the document, which changes where the work happens. The text is fixed on the way into Word or Excel, so there is no find-and-replace on a file you might have to undo. One-line joins the clip, Collapse squeezes the double spaces a join leaves, No blanks drops the empty rows.

The same set is on the web if you would rather paste into a box: try it free in your browser. I built the clipboard version because I was doing the Word three-pass dance several times a week and getting it wrong about a third of the time.

Excel: the character you cannot type

Excel has no ^p code. The break inside a cell is a real character, and you enter it into the Find and Replace dialog by pressing Ctrl+J with the cursor in the field. Nothing appears. The field looks empty and it is not, which is the single most confusing part of this. Press Replace All and the breaks go.

That keypress also works in the Replace field, if what you want is to put breaks in rather than take them out. Inside a cell itself, ⌥Return makes a new line.

Ctrl+J only matches one of the two breaks. It inserts CHAR(10), the line feed. Text imported from older Windows systems also carries CHAR(13), the carriage return, and those survive the replace untouched. The formula covers both:

=TRIM(SUBSTITUTE(SUBSTITUTE(B2,CHAR(13),""),CHAR(10)," "))

CHAR(10) becomes a space, CHAR(13) is deleted, and TRIM tidies the leftover doubles. Copy the result, then paste it back as values over the original column.

One caveat. If your Excel has Wrap Text on, a cell can look multi-line with no break characters in it at all. Check the formula bar before you go hunting.

The route that skips both dialogs

Paste multi-line text into a single Excel cell and Excel spreads it across rows, which is usually the moment people start searching for this in the first place. Join the text before the paste and it lands in one cell.

That is the whole argument for cleaning the clip rather than the file. Copy, tap One-line in the preview, paste with ⌘V. No dialog, no formula column, nothing to undo in a spreadsheet somebody else owns. When you want the opposite behaviour, one value per cell, split copy breaks the clip by line and ⌃⌘V walks through the pieces one paste at a time.

Frequently asked questions

What is the code for a line break in Word Find and Replace?

^l matches a manual line break from Shift+Return. ^p matches a paragraph mark from Return. Use ^p^p to find the blank line between paragraphs.

How do I get rid of breaks inside an Excel cell?

Open Find and Replace, click into the Find field, press Ctrl+J, leave Replace empty, then Replace All. For imported data, the CHAR(13) and CHAR(10) formula is safer because Ctrl+J misses carriage returns.

Why does Ctrl+J find nothing in my sheet?

The field looks blank after Ctrl+J even when the character is there, so it usually did register. If Replace All reports no matches, your breaks are CHAR(13), or Wrap Text is faking the layout.

Can I fix the text before it reaches the cell?

Yes, and it is faster. Join the lines on the clipboard, then paste. In Klipto that is one tap in the paste preview, offline, in whichever app has focus.

Get Klipto for Mac

Free for 14 days · no card, no account required · 5 MB

Download Klipto