File Format & Compatibility

How to Fix Lost Paragraph Breaks When Converting TXT to DOCX

Olivia MillerOlivia Miller Oct 28, 2026 868 views

Question details

The user needs to maintain paragraph separations when converting or saving a plain text (TXT) file into a Word document (DOCX).

How to Fix Lost Paragraph Breaks When Converting TXT to DOCX
Product
Word Processor
Device & OS
not provided
Scenario
Opening a plain text file in a word processor and attempting to save it as a structured DOCX file.
Observed behavior
Paragraph breaks disappear and text merges into a single large block because the word processor does not interpret the original line-break characters as standard paragraph marks.
Before you start

Make a copy of your original TXT file to test the formatting conversion process before overwriting your primary document.

Solution 1Recommended

Use Find and Replace to Convert Line Breaks

Manually convert the unrecognized carriage returns into standard Word paragraph marks before saving the document.

Plain text files often use different character codes for line breaks compared to rich text documents. By replacing the carriage return code (^13) with a standard paragraph mark (^p), the word processor can correctly render the layout.

1
Open Find and Replace

Open the TXT file in your word processor. Press 'Ctrl + H' on your keyboard to open the Find and Replace dialog box.

2
Input the specific character codes

In the 'Find what' field, type ^13 (which represents a standard carriage return). In the 'Replace with' field, type ^p (which represents a word processor paragraph mark).

3
Execute the replacement

Click the 'Replace All' button to convert all line breaks throughout the document.

4
Save as DOCX

Once the paragraph separations are visible, go to File > Save As, and choose 'Microsoft Word Document (*.docx)' as the file format.

Use Find and Replace to Convert Line Breaks
Formatting Restored: Your text will now display proper paragraph breaks and formatting will remain intact the next time you open the DOCX file.

Seamlessly Convert TXT to DOCX with WPS Office

WPS Writer easily handles plain text files and offers powerful find and replace formatting tools to ensure your document layout remains flawless when saving as a DOCX.

  1. 1. Open the TXT File: Launch WPS Writer and open your plain text file. If prompted, confirm the text encoding (usually UTF-8).
  2. 2. Access Find and Replace: Press 'Ctrl + H' to open the Replace tab in the Find and Replace dialog.
  3. 3. Convert Line Breaks: Enter ^13 in the 'Find what' box and ^p in the 'Replace with' box, then click 'Replace All'.
  4. 4. Save as Document: Go to Menu > Save As, select 'Microsoft Word Document (*.docx)', and click Save.
Fully compatible with Microsoft Word DOC and DOCX formats.Advanced Find and Replace features for complex formatting and special characters.Lightweight and free to use across Windows, Mac, and Linux.Clean, intuitive interface familiar to Office users.
microsoft office alternative - wps office

Frequently Asked Questions

Why do TXT files lose formatting when opened in a word processor?

TXT files are plain text and often use different line break characters (like carriage returns) that word processors don't automatically parse as standard structural paragraphs, causing the text to run together.

What do ^p and ^13 mean in the Find and Replace menu?

The code ^p is a special character used in word processors to represent a standard paragraph mark. The code ^13 represents a carriage return character commonly generated by plain text editors.

Why are spaces between words missing after converting a TXT file?

This usually happens due to mismatched text encoding when opening the file. Ensure you select the correct encoding format (like UTF-8) when the word processor first imports the TXT file.

Can I automate fixing paragraph breaks for multiple TXT files?

Yes, you can record a Macro that runs the Find and Replace operation (^13 to ^p) and saves the document as a DOCX, allowing you to quickly apply the fix to other files.