← Back

TXT to Word

Turn plain text into an editable Word document

Text content

The generated document contains only plain text paragraphs with no special formatting — you can adjust fonts, sizes and other styling in Word after downloading. Everything runs locally in your browser, and your content is never uploaded.

About TXT to Word

TXT to Word turns plain text into an editable .docx document. You can choose a .txt file or paste or type text into the box, then click 'Convert and download Word'. The rules are simple: every line of your text becomes one paragraph in Word, a blank line becomes an empty paragraph, and there are no heading styles, font settings or page settings. It is good for quickly putting loose text into a Word file you can keep editing, and it is not meant to produce a finished, nicely formatted document.

How to use it

  1. Click the dashed box 'Click to select a .txt file (or paste text directly below)' to choose a file, or paste or type into the box under 'Text content'.
  2. After a file is read, its content appears in the box and you can keep editing it. The button below is disabled while the box is empty or only whitespace.
  3. Click 'Convert and download Word'. It shows 'Generating…' while working, and the browser then downloads a .docx file.
  4. Open the file in Word, WPS or similar, and set fonts, sizes, heading styles and margins there.

A worked example

We processed this text the same way the tool does (split on line breaks, one paragraph per piece, a single trailing line break ignored) using the same document library: a title line (in Chinese, meaning 'Meeting notes'), one blank line, two short lines of details, and a trailing line break at the end. Splitting gives 5 pieces; the last one is empty only because the text ends with a line break, and the tool drops it. So the document has 4 paragraphs, 1 of them empty. We then read the generated file back with a different library and all three text paragraphs came through intact. The takeaway: every blank line in your text becomes an empty paragraph (three blank lines in a row create three empty paragraphs), while a single line break at the very end adds nothing. Delete blank lines in the text box first if you do not want them.

Limits and known behavior

  • One paragraph per line break. There is no option to merge adjacent lines into a paragraph. If your TXT was hard-wrapped at a fixed width, Word will break paragraphs in the same places and you must merge them yourself.
  • Blank lines are not removed. They become empty paragraphs, and consecutive blank lines become consecutive empty paragraphs.
  • No formatting. Headings, lists and bold are not detected. All paragraphs use Word's default style, and the font and size follow your Word defaults.
  • A .txt file is decoded as UTF-8. Files in older encodings such as GBK or Big5 may appear garbled with no error shown; re-save them as UTF-8 in a text editor first.
  • Windows-style (CRLF), Unix-style (LF) and old Mac-style (CR) line endings are all recognised, so no stray carriage return is left at the end of a paragraph.
  • File naming: when you selected a file, the download is named after it with .txt replaced by .docx. When you only pasted text, the name is always document.docx.
  • Minor known quirk: if you pick a file and then rewrite the text by hand, the download name still follows the originally picked file.
  • Images, tables, headers, footers and page numbers are not supported, and there is no paper size setting.

Can I use the generated Word file directly?

You can open and edit it right away, but it is a bare document of plain text. For headings, bold, a table of contents and other layout, set them up in Word yourself. If your source is in Markdown, use the site's Markdown to Word tool instead, which converts headings and bold.

Why is my Chinese text garbled?

The most common cause is a .txt file that is not UTF-8. The tool decodes files as UTF-8, so older encodings such as GBK come out garbled. Open the file in Notepad, choose Save As, set the encoding to UTF-8, and upload it again. Or copy the text and paste it into the box; pasted text does not depend on file encoding.

Are indents and spaces kept?

Characters in your text are placed in the paragraphs as they are, so leading spaces and full-width spaces remain. How Word displays runs of spaces is up to Word itself, though. For tidy alignment, use indents or tab stops in Word instead of relying on spaces.

What happens with a very large text?

The document is generated in your browser, so speed depends on the number of paragraphs and on your device. No size limit is set in the code. With very long text you may wait a moment, and the button shows 'Generating…' and cannot be clicked in the meantime.

Can I edit the text after downloading?

Yes. The text box keeps its content after a download, so you can edit it and click 'Convert and download Word' again to produce a new file.

Privacy and processing

Reading the file and building the .docx both happen in your browser. The document library is loaded by the page when you click convert, and the code contains no request that sends your text to a server. The text exists only on the current page and is gone when you close or refresh it.