Language
TXT to Word - Convert Plain Text to Word Document | ButDoc

Convert TXT to Word (.docx) Online

A .txt file holds your words and nothing else — no fonts, no headings, no bold, no page layout. Converting it to .docx gives that text a real document structure you can format, share and print. Upload your file above and the converted Word document downloads in a few seconds.

It sounds like it should be trivial, and most of the time it is. But plain text carries almost no information about itself, so a converter has to make several assumptions on your behalf. When those assumptions are wrong, you get a document full of é where the accents should be, or one endless paragraph where you expected line breaks. Below is what is actually happening, and how to get a clean result the first time.

Encoding: the reason accented characters break

This is the single most common thing that goes wrong, and it is worth understanding because no converter can reliably fix it for you.

A .txt file is a sequence of bytes. It contains no header, no metadata, and crucially no statement of which character encoding was used to write it. When software opens one, it has to guess. Guess UTF-8 when the file is Windows-1252 and every accented letter turns into two strange symbols. Guess Windows-1252 when the file is UTF-8 and you get the classic é for é, ’ for a curly apostrophe, and mojibake through any Arabic, Cyrillic, Greek or Chinese text.

The safe move is to save your file as UTF-8 before uploading. It covers every language and is what modern software expects.

  • Windows Notepad: File → Save As, then set the Encoding dropdown at the bottom to UTF-8.
  • Mac TextEdit: Format → Make Plain Text, then File → Save and choose Unicode (UTF-8).
  • VS Code: click the encoding label in the status bar, choose Save with Encoding, then UTF-8.

One caveat if you use Notepad on Windows: the option labelled UTF-8 with BOM adds three invisible bytes to the start of the file. Most software handles this correctly, but if a stray character appears at the very beginning of your Word document, re-save without the BOM.

Line breaks: why your paragraphs merge or split

Plain text has no concept of a paragraph. It only has line breaks, and it does not distinguish between a break you added deliberately and one your text editor added because the window was narrow.

That ambiguity produces the two complaints people have after converting:

Everything became one giant block. Your original relied on soft wrapping — the text ran on and your editor displayed it across several lines without ever inserting a break. There were no real breaks to preserve. Add a blank line between paragraphs in the source and the structure survives.

Every line became its own paragraph. The opposite case: your file has a hard line break at the end of each visual line, common in text exported from email clients or older systems. Word honours each one. In Word you can repair this quickly with Find and Replace — enable wildcards or use ^p^p to protect genuine paragraph breaks first, then collapse the single ones.

There is also a quieter difference between operating systems. Windows ends a line with two characters (carriage return plus line feed), while Mac and Linux use one. Well-behaved converters handle both, but a file that has travelled between systems several times can end up with a mixture, which sometimes shows as extra blank lines.

What the converted document will and will not have

Conversion moves your text into a Word container. It does not invent structure that was never there.

You get: a real .docx file, all your text intact, paragraph breaks where the source had them, and full access to every Word feature from that point forward — styles, fonts, images, tables, headers, track changes, comments.

You do not get: automatic headings. If your source used a line of equals signs or capital letters to mark a section title, Word sees ordinary body text. Applying Heading 1 and Heading 2 afterwards takes a minute and is what makes a navigation pane and an automatic table of contents possible. Nor do you get bold, italics, bullet characters converted into real lists, or hyperlinks — unless Word's autoformat happens to recognise a URL.

Fixed-width text and code

Text files often contain content that depends on alignment: ASCII tables, log output, indented source code, columns padded with spaces. All of it lines up in Notepad because Notepad uses a monospace font, where every character occupies exactly the same width.

Word's default font is proportional. An i is narrower than an m, so carefully aligned columns collapse into a ragged mess the moment the font changes.

The fix takes seconds: select the affected text in Word and set the font to Consolas, Courier New or another monospace face. Alignment returns immediately. For source code specifically, also consider turning off autocorrect — Word will otherwise convert straight quotes to curly ones and capitalise the first letter after a full stop, both of which break code silently.

Large files

Text is extremely compact, so a file that seems small can hold an enormous amount of content. A 5 MB log file is roughly five million characters — around a million words, or several thousand printed pages. The conversion will complete, but Word may become slow to scroll and repaginate.

If you are working with logs, exports or transcripts of that size, split the file into sections before converting, or ask whether Word is the right destination at all. For data arranged in columns, a spreadsheet is usually a better fit than a document.

Frequently Asked Questions

Why do I see strange symbols like é instead of accents?
That is an encoding mismatch: the file was written in one character set and read as another. Re-save the original as UTF-8 and convert again. The damage cannot be repaired after conversion, so always fix it at the source.
Will my formatting be preserved?
A .txt file contains no formatting at all — no bold, no fonts, no sizes. There is nothing to preserve. What you get is clean, unformatted text in a Word document, ready for you to style however you like.
Why did all my paragraphs merge into one block?
Your source used soft wrapping rather than real line breaks, so there were no breaks to carry over. Insert a blank line between paragraphs in the .txt file and convert again.
Does it work with code files?
Yes. Rename the file to .txt if needed and upload it. Afterwards, set the text to a monospace font such as Consolas so indentation lines up, and turn off Word's autocorrect so it does not alter quotes or capitalisation in your code.
Can I convert a .txt file on my phone?
Yes. The tool runs in the browser, so it works on iPhone and Android without installing anything. Note that mobile keyboards and note apps commonly insert curly quotation marks, which are a frequent source of encoding trouble — saving as UTF-8 avoids it.
Will the .docx open in Google Docs or LibreOffice?
Yes. The output is a standard .docx, which Google Docs, LibreOffice Writer, Apple Pages and Word on any platform all open natively.
Is my data private?
Your file is uploaded over an encrypted connection, converted automatically without human review, and permanently deleted from our servers within 60 minutes. Full detail is in our Privacy Policy.

Related tools

Working the other direction or with a different source? Word to TXT strips a document back to plain text. Markdown to PDF suits notes written with Markdown syntax. HTML to Word handles web content, and all Word tools covers the rest.