Remove Line Breaks in Word: ^p, ^l and Keep Paragraphs
November 11, 2026 · 9 min read
Remove Line Breaks in Word with Find and Replace (^p and ^l)
To remove line breaks in Word, press Ctrl+H, type ^p in Find what, type one space in Replace with, and click Replace All. Use ^l instead when the breaks came from Shift+Enter. Before you replace anything, check which kind of break your document stores, so you remove only that one and keep your real paragraphs.
Paragraph Marks, Line Breaks and Page Breaks: What Word Stores
Word doesn't have one "line break". It has four different marks, and Find and Replace treats each one separately. Turn on Show/Hide ¶ (the pilcrow button on the Home tab, or Ctrl+Shift+8 on Windows and Command+8 on a Mac) and the hidden marks appear.
| Break | You create it with | What you see | Find code |
|---|---|---|---|
| Paragraph mark | Enter | ¶ | ^p |
| Manual line break (soft return) | Shift+Enter | ↵ bent arrow | ^l |
| Manual page break | Ctrl+Enter | dotted line labelled Page Break | ^m |
| Section break | Layout > Breaks | double dotted line labelled Section Break | ^b |
The codes use a lowercase letter after the caret. If you'd rather not type them, click More in the Find and Replace dialog, then Special, and pick the mark from the list. Word inserts the code for you.
Text pasted from a web page or an email can arrive with ↵ inside paragraphs and ¶ only between them. Text copied from a PDF often has ¶ at the end of every line. Knowing which one you have decides the whole fix.
How to Remove Line Breaks in Word with Find and Replace
Here's how to remove line breaks in the Word desktop app on Windows:
- Select the text you want to fix. If nothing is selected, Word works on the whole document.
- Press Ctrl+H to open the Replace tab.
- Type the code for your break in Find what.
- Type a single space in Replace with.
- Click Replace All. If Word asks whether to continue through the rest of the document, click No to stay inside your selection.
For paragraph marks, the pair looks like this:
Find what: ^p
Replace with: (one space)
Every ¶ in the selection becomes a space, so the lines join into one continuous block. That's ideal for a single wrapped paragraph and too aggressive for a full document.
For soft returns, swap the code:
Find what: ^l
Replace with: (one space)
Only the ↵ marks change. Your ¶ marks stay put, so the paragraph structure survives untouched.
On a Mac, Control+H opens the basic Find and Replace pane. For the full dialog with the Special menu, open View > Navigation Pane, click the magnifying glass, then the settings gear, and choose Advanced Find & Replace. Microsoft's Find and replace help page shows the same route.
How Do I Join Wrapped Lines in Word but Keep Paragraphs?
If the paragraphs are separated by an empty line (two ¶ marks in a row), use a placeholder. You protect the double marks, flatten the single ones, then put the doubles back. Run these three passes in order:
Pass 1 Find what: ^p^p Replace with: @@PARA@@
Pass 2 Find what: ^p Replace with: (one space)
Pass 3 Find what: @@PARA@@ Replace with: ^p
Pass 1 swaps every paragraph gap for a marker that can't appear in normal text. Pass 2 joins all the wrapped lines. Pass 3 turns each marker back into a single paragraph mark, so you end up with clean paragraphs and no blank lines between them. Use ^p^p in pass 3 if you want the blank lines back.
We prefer this method over wildcards because it's predictable. Word reports how many replacements it made after each pass, so a wrong count after pass 1 is easy to spot, and Ctrl+Z undoes it. The catch: it only works when the original text has blank lines between paragraphs.
Fixing Text Pasted from a PDF: Hyphens, Double Spaces and Wildcards
PDF text is where most people hit this problem, and order matters. Remove end-of-line hyphens first, or "infor-¶mation" turns into "infor- mation".
Step 1 Find what: -^p Replace with: (nothing)
Step 2 Find what: ^p Replace with: (one space)
Step 3 Find what: ^w Replace with: (one space)
Step 1 glues split words back together. Step 2 joins the lines. Step 3 uses ^w, which matches any run of spaces and tabs, so the double spaces left behind collapse to one. If a PDF used soft returns, swap ^p for ^l in the first two steps. To keep paragraphs that are separated by blank lines, run pass 1 of the placeholder method before step 2 and pass 3 after step 3.
The limitation: step 1 can't tell a typesetting hyphen from a real one. A compound like "well-known" that happened to break at the hyphen becomes "wellknown", so skim the result.
When the PDF text has no blank lines between paragraphs, try a wildcard pass instead. Tick Use wildcards under More. With wildcards on, Word doesn't accept ^p in Find what, so you use ^13 (the paragraph character) instead:
Find what: ([!^13.\?\!:])^13
Replace with: \1 (followed by one space)
This joins a line to the next one only when it doesn't end in a period, question mark, exclamation mark, colon or another paragraph mark. The parentheses capture that last character, and \1 writes it back before the space. Headings without punctuation will still get joined, so test it on a copy first. If your end goal is Markdown rather than a Word file, our guide to converting a PDF to Markdown covers that route.
Deleting Page Breaks and Section Breaks with ^m and ^b
Page and section breaks aren't line breaks, but they cause the same "why is there a gap here" moment. Find ^m and replace it with nothing to delete every manual page break. Find ^b and replace it with nothing to delete section breaks. Note that ^b works only in Find what. A solid line you can't click is usually a paragraph border, which our guide to adding a line in Word shows how to remove.
Be careful with section breaks. A section break stores the formatting of the section before it, so deleting it makes that text take on the formatting of the following section. Orientation, margins, columns, headers and footers can all change. Microsoft's article on how to insert, delete, or change a section break explains which section's formatting wins.
How Do I Completely Remove Space Between Lines in Word?
Often the gap isn't a break at all. It's paragraph spacing, which the default Normal style adds after every ¶. Show/Hide ¶ tells you: if there's no empty ¶ in the gap, it's spacing.
To remove it, select the text and open the Paragraph dialog (Home > Paragraph launcher on Windows, Format > Paragraph on a Mac). Set Spacing Before and After to 0 pt and Line spacing to Single. Tick "Don't add space between paragraphs of the same style" if the spacing comes from a style.
Two other causes look like odd breaks. A justified line that ends in a Shift+Enter stretches its words across the full width, so replace that ^l with a space or left-align the paragraph. Text that jumps to the next page usually has Keep with next or Page break before ticked on the Line and Page Breaks tab of the same dialog.
How to Remove Line Breaks in Google Docs
Google Docs has no ^p codes, so you use a regular expression. Open Edit > Find and replace (Ctrl+H, or Cmd+Shift+H on a Mac, per Google's Docs keyboard shortcuts). Then:
- Tick Match using regular expressions.
- Type
\nin Find. - Type one space in Replace with.
- Click Replace all.
Google's help doesn't document exactly which breaks \n matches, and user reports differ on whether it catches Enter breaks, Shift+Enter breaks or both. Check the match count Docs shows before you click Replace all. If it finds nothing, the text likely uses a break the pattern doesn't reach.
There's a second limit. Google's Find and replace help says regex in the Replace with field is inserted as literal text in Docs. You can't write a new paragraph break back in, so the placeholder method above doesn't round-trip in Docs. For that job, open the file in Word or use a plain-text tool.
When a Plain-Text Line Break Remover Is Faster
Sometimes you just need to remove line breaks from Word text before pasting it into an email, a form field or a CMS. Find and Replace is more work than that's worth. Paste the text into our line break remover, which runs in the browser. It has a Keep paragraph breaks option, and the same page also trims whitespace and removes empty lines. For whole files, our guide to removing line breaks from text has regex and terminal recipes.
It works on plain text, so bold, links and headings don't survive the trip. Paste the result back into Word and reformat. If you're heading the other way and need to add breaks in Markdown, see our post on the Markdown line break. To convert the cleaned document itself, read how to convert Word to Markdown.
Soft Returns, Odd Breaks and Word for the Web
Before you remove line breaks in Word, turn on Show/Hide so you know whether you're dealing with ¶, ↵, page or section breaks. Then replace exactly that mark, and use the placeholder passes when real paragraphs matter. For quick plain-text cleanup, paste into the line break remover above. To write the result up as Markdown, use the editor, which is free and needs no account.