How to Remove Line Breaks When Pasting Text into Word
Question details
The user needs to remove unwanted manual line breaks and paragraph marks from text pasted from external sources like websites or PDFs.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Pasting text copied from a website or another document into a word processor.
- Observed behavior
- The pasted text retains original manual line breaks and paragraph marks, preventing the text from naturally reflowing across the page width.
Before removing line breaks, ensure you have pasted the text using the "Keep Text Only" option to strip out unwanted web formatting like fonts, links, and background colors.
Use Find and Replace to Remove Line Breaks
This is the most efficient method to clean up large blocks of text by automatically replacing manual line breaks or paragraph marks with spaces.
When you copy text from PDFs or websites, it often contains hidden line break characters (^l) or paragraph marks (^p). Replacing these with a single space allows your text to flow naturally according to your document's margins.
Copy your source text and paste it into your Word document.
Press the Ctrl + H keyboard shortcut to open the Find and Replace dialog box.
In the "Find what" field, type ^l for manual line breaks or ^p for paragraph marks.
In the "Replace with" field, type a single space.
Click "Replace All" to remove the breaks across the pasted text.

Strip Formatting Before Cleaning Line Breaks
Remove rich text formatting first to make it easier to identify and manage persistent line breaks.
Manage Text Formatting Easily with WPS Writer
WPS Office Writer provides a powerful Find and Replace tool alongside intuitive Paste Special options, allowing you to seamlessly format text copied from any web page or PDF without the hassle.
- 1. Paste text without formatting: Open WPS Writer and paste your copied text using the "Keep Text Only" option.
- 2. Open the Replace tool: Press Ctrl+H to open the Replace dialog box.
- 3. Select special characters: Click the "Special" button in the dialog box to easily insert Paragraph Marks or Manual Line Breaks into the Find field without remembering the exact codes.
- 4. Format instantly: Put a single space in the Replace field and click "Replace All" to fix the document flow.

Frequently Asked Questions
Why does text from websites paste with weird line breaks?
Web pages and PDFs often use hard returns or fixed-width formatting. When copied, these hidden characters are transferred to your document, forcing the text to break exactly where it did on the source page rather than flowing to fit your page margins.
What is the difference between ^p and ^l in Find and Replace?
The ^p code represents a standard paragraph mark (created by pressing Enter), while ^l represents a manual line break (created by pressing Shift+Enter). Depending on the source text formatting, you may need to search for one or both to fix the document.
How can I prevent paragraphs from merging when replacing all paragraph marks?
If your pasted text uses double paragraph marks (^p^p) to separate actual paragraphs, first use Find and Replace to change ^p^p to a temporary placeholder like ###. Then replace all remaining single ^p marks with a space, and finally replace ### back to ^p to restore your intended paragraphs.




