Convert a Text File to Word: Paragraphs, Fonts, Encoding

Автор: FileConvertLab

Опубликовано:

Converting a TXT file to DOCX: hard-wrapped text lines joined into Word paragraphs set in Calibri 11 pt
Illustration of a plain text file with short hard-wrapped lines on the left and a Word document with flowing paragraphs on the right, with labels for blank line equals new paragraph, Calibri 11 pt and UTF-8

To convert a text file to Word, upload the .txt to the TXT to DOCX converter and download the .docx — or open the .txt in Word and use Save As → Word Document. The two routes don't give the same document: the converter joins hard-wrapped lines into real paragraphs and sets the text in Calibri 11 pt, while Word keeps every line as a separate paragraph. Which one you want depends on what's in the file, and that's what this guide sorts out.

How to Convert a Text File to Word (TXT to DOCX)

  1. Open the TXT to DOCX converter
  2. Drop your .txt file — or several; they convert one after another in a queue
  3. Download the .docx, or Download all as ZIP for a batch
  4. Open it in Word, Google Docs, LibreOffice Writer or Pages

The conversion runs on our servers over HTTPS. A single file can hold up to 5 million characters and become up to 100,000 paragraphs; past that, the converter asks you to split the file. Guests can upload up to 100 MB per file, which no normal text file comes near.

What the Converter Does With Your Text

We wrote a test file that mixes the usual suspects — a title, a paragraph hard-wrapped at about 60 characters, a hyphen list, a tab-separated table, an indented code snippet and a two-line verse — converted it, and read the DOCX's XML.

In the TXTIn the DOCX
A line followed by a blank lineIts own paragraph
Three hard-wrapped lines of one paragraphOne paragraph; the line breaks become spaces
One or several blank linesOne paragraph break — no empty paragraphs
List lines with no blank lines between themMerged into one paragraph: "Action items: - Anna… - Marc…"
Tab-separated table rowsMerged into one paragraph; the tabs are kept
Indentation at the start of a lineRemoved
Two lines of verseOne line: "Roses are red, Violets are blue."
FontCalibri 11 pt on every paragraph
Headings, bold, listsNone — plain text has nothing to take them from

Windows (CRLF) and Mac/Linux (LF) line endings give the same result.

The rule is simple: a blank line starts a new paragraph; a single line break doesn't. That's exactly right for prose that was wrapped at 72 or 80 characters — exported emails, notes from a terminal editor, public-domain book texts. You get flowing paragraphs instead of ragged lines, which is the hardest thing to fix by hand in Word.

It's wrong for text where every line matters: lists, addresses, tables, poems and code. Those need one extra step before converting.

How to Keep Lists, Addresses and Tables Intact

Put a blank line after every line you want to keep as its own paragraph. You don't have to do it by hand:

  • Notepad++ or VS Code: select the list, open Replace with regular expressions on, replace \n with \n\n
  • Any editor: press Enter once more after each list item, address line or verse line
  • Or skip the converter for that file: open it directly in Word (below), which keeps every line

Tab-separated tables are the one case where the direct route is clearly better. Word keeps each row as its own paragraph with the tabs intact, and Insert → Table → Convert Text to Table turns them into a real table in one step.

Encoding: Which Text Files Read Correctly

Garbled letters in the output are almost always an encoding problem, not a conversion bug. We saved short test texts in each encoding below and converted them one by one:

Saved asResult
UTF-8, with or without BOMCorrect
UTF-16 with BOM (Notepad's "UTF-16 LE")Correct
Windows-1252 / ISO-8859-1 (café, naïve, €, curly quotes)Correct
Windows-1251 (Russian)Correct
ISO-8859-2 (Polish, Czech)Correct
KOI8-R (old Russian Unix files)Correct
Shift-JIS (Japanese)Correct
UTF-16 without BOMCorrect

UTF-8 always works, and it's what current Notepad and TextEdit save by default. The older encodings are recognised from the text itself, which needs a sentence or two to go on: a file of just a few words, such as a lone "Zażółć gęślą jaźń" in ISO-8859-2, can still come out wrong. Re-save a file like that as UTF-8:

  • Notepad (Windows): File → Save as → Encoding: UTF-8 → Save
  • TextEdit (Mac): if the file opens garbled, set Settings → Open and Save → Plain Text File Encoding to the right encoding, reopen it, then save with Unicode (UTF-8)
  • VS Code: click the encoding in the status bar → Reopen with Encoding (pick the real one) → click again → Save with Encoding → UTF-8
  • Notepad++: Encoding → Convert to UTF-8 → Save

Opening a TXT File Directly in Word

Word opens plain text itself: File → Open, switch the file filter to All Files or Text Files, pick the .txt. If Word isn't sure about the encoding, it shows a File Conversion dialog — choose Other encoding, pick the right one and watch the preview until the accents look right. Then File → Save As → Word Document (*.docx). Until you do that, you're still editing a .txt, and everything you format disappears on save.

What you get is different from the converter:

Open in WordTXT to DOCX converter
Each line of the TXTIts own paragraphJoined until the next blank line
Hard-wrapped proseStays broken into short linesBecomes flowing paragraphs
Lists, tables, verseKept line by lineMerged unless separated by blank lines
EncodingYou pick it in the dialogDetected automatically for the encodings above
Needs Word installedYesNo

Rule of thumb: prose → converter; line-by-line content → Word directly.

Converting TXT to Word With Google Docs

No Word at all? Upload the .txt to Google Drive, right-click it → Open with → Google Docs, then File → Download → Microsoft Word (.docx). Like Word, Google Docs keeps every line as a paragraph, so hard-wrapped text stays ragged.

TXT to DOCX, RTF or ODT?

We also have TXT to RTF and TXT to ODT, and they behave differently from the DOCX converter. Running the same test files through them showed:

  • Every line stays its own paragraph, in a monospaced "Preformatted Text" style — useful for code, logs and poetry, where layout carries meaning
  • They read UTF-8 only. Our Windows-1252 test file came out as "Caf�, na�ve", so re-save as UTF-8 first

Pick DOCX for anything that should read like a document and go to Word users. Pick ODT if the file will live in LibreOffice (see ODT to DOCX for moving it to Word later). RTF only makes sense for an old program that can't read DOCX; RTF vs DOCX explains why, and the RTF to TXT guide covers the way back to plain text.

After the Conversion: First Steps in Word

The DOCX is a clean starting point, not a finished document. Three quick wins:

  1. Mark the headings. Click a title line and pick Heading 1 or Heading 2 from the Styles gallery; the Navigation Pane and a table of contents come for free
  2. Change the font the right way. Calibri 11 pt is set directly on the text, so editing the Normal style alone won't change it. Press Ctrl+A then Ctrl+Space (Cmd+A, Ctrl+Space on Mac) to clear it, and the Normal style takes over
  3. Add space between paragraphs. The file sets none, so paragraphs sit tight against each other. Set it once in the Normal style (Paragraph → Spacing After) instead of typing blank lines

The full walkthrough — heading styles, lists, cleaning line breaks, tables, page numbers — is in how to format plain text in Word. For what's inside the file you just made, see the DOCX format guide.

Troubleshooting TXT to DOCX

Accented letters show as odd symbols. The file is probably a few words in an older encoding, too little text to recognise it from. Re-save as UTF-8 and convert again.

My list turned into one long line. The list items had no blank lines between them. Add them, or open the file directly in Word.

The document is one giant paragraph. Your TXT has no blank lines at all — common with text copied from a chat or a PDF. Open it in Word instead, or add blank lines where paragraphs should break.

"This text file holds more characters than this converter handles." Split the file into parts under 5 million characters each and convert them together, then download them as one ZIP.

I need plain text again. DOCX to TXT strips the formatting back out. Anything you added in Word — headings, bold, tables — is lost in that direction.

Summary

The TXT to DOCX converter turns hard-wrapped plain text into proper paragraphs in Calibri 11 pt and recognises UTF-8, UTF-16 and the common older encodings on its own. Separate list items with blank lines first, or open line-by-line files straight in Word. For prose, the TXT to DOCX converter saves you the one job that's tedious by hand: rejoining broken lines.

Related Tools

Часто задаваемые вопросы

How do I convert a TXT file to a Word document?

Upload the .txt to the TXT to DOCX converter and download the .docx, or open the file in Word with File, Open and save it with File, Save As, Word Document. The converter joins wrapped lines into paragraphs; opening in Word keeps every line separate.

Why did my text lines get joined into one paragraph?

The converter starts a new paragraph only at a blank line, which repairs text that was hard-wrapped at a fixed width. Lists, addresses and poems need a blank line after each line you want to keep, or you can open that file directly in Word instead.

What font does the converted DOCX use?

Calibri 11 pt, applied directly to every paragraph. No headings or other styles are added, because a plain text file has no formatting to take them from.

Why do accented letters look wrong after converting TXT to DOCX?

Most likely the file holds only a few words in an older encoding, which is too little text to recognise the encoding from. UTF-8, UTF-16 and a sentence or more in encodings such as ISO-8859-2, KOI8-R or Shift-JIS read correctly. Re-save the file as UTF-8 and convert again.

Can I convert a Notepad file to Word without Microsoft Word?

Yes. The online converter produces a .docx without any software installed, and Google Docs can also open a .txt from Google Drive and download it as a Word file.

Can I convert several text files to DOCX at once?

Yes. Drop several .txt files onto the converter; they convert one after another and can be downloaded together as a ZIP archive.

Is TXT to DOCX better than TXT to RTF?

For documents, yes. DOCX is what Word and most other editors expect, and the DOCX converter rejoins wrapped lines. The RTF and ODT converters keep every line in a monospaced style, which suits code or poetry but not ordinary prose.