Document Editing Problems

How to Remove Line Breaks When Pasting Text into Word

Anum MushtaqAnum Mushtaq Oct 26, 2026 869 views

Question details

The user needs to remove unwanted manual line breaks and paragraph marks from text pasted from external sources like websites or PDFs.

How to Remove Line Breaks When Pasting Text into Word
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 you start

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.

Solution 1Recommended

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.

1
Paste text into Word

Copy your source text and paste it into your Word document.

2
Open Find and Replace

Press the Ctrl + H keyboard shortcut to open the Find and Replace dialog box.

3
Enter line break codes

In the "Find what" field, type ^l for manual line breaks or ^p for paragraph marks.

4
Replace with a space

In the "Replace with" field, type a single space.

5
Execute replacement

Click "Replace All" to remove the breaks across the pasted text.

Use Find and Replace to Remove Line Breaks
Reviewing Paragraphs: After replacing all paragraph marks, you may need to manually press Enter in places where actual paragraphs should begin, as this method merges everything into a continuous block of text.
Edit Documents Effortlessly

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. 1. Paste text without formatting: Open WPS Writer and paste your copied text using the "Keep Text Only" option.
  2. 2. Open the Replace tool: Press Ctrl+H to open the Replace dialog box.
  3. 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. 4. Format instantly: Put a single space in the Replace field and click "Replace All" to fix the document flow.
Advanced Find and Replace tool for precise formatting controlSeamlessly compatible with Microsoft Word (.docx) formatsBuilt-in Special Character selector so you do not have to memorize codesLightweight, fast, and free to use
microsoft office alternative - wps office

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.