TXT to Word Converter

Convert TXT to Word in your browser without uploading your text. Paste text or select up to 50 files, with limits of 10 MB per input and 100 MB per batch. One input produces a .docx; multiple files produce a .zip.

Drop files here or choose files
Files stay on your device · the .docx is written in your browser · up to 10 MB per file · up to 50 files in one batch · or just paste your text

A plain text file does not record which encoding it was written in, so reading it the wrong way turns Chinese, Japanese or Cyrillic text into garbled characters or question marks. Automatic detection looks at the bytes, in this order: a byte order mark at the start of the file, then a check of whether the whole file is valid UTF-8, and otherwise GB18030 — the superset of GBK that covers what Windows Notepad calls ANSI for Chinese. What decides the branch is the bytes themselves, not the encoding the file was saved in: GBK or Latin-1 bytes that happen to form valid UTF-8 are read as UTF-8 and can come out as other characters with no warning at all. Big5, Shift-JIS and Latin-1 files may be misread this way, and may also be refused before decoding finishes. If the preview looks wrong, pick an encoding here yourself; for a UTF-16 file with no byte order mark choose UTF-16, which is read as little-endian unless the file starts with a big-endian mark.

Plain text has no paragraphs, so they have to be guessed. Blank line starts a paragraph treats an empty line as the break and keeps line breaks inside a paragraph as Word soft line breaks; One paragraph per line makes every line its own paragraph and drops the empty ones. Smart splits on blank lines first, then switches to one paragraph per line if that leaves a single non-empty block holding at least three line breaks — which is exactly the one-entry-per-line log that would otherwise arrive as a single wall of text.

This value goes into the .docx file properties and builds the download name. Leave it empty and the name of the file you picked is used without its extension; with pasted text the file is document.docx. The two are not always the same string: the file properties keep what you typed after leading and trailing whitespace is removed, while the download name replaces the characters a file name cannot hold (\ / : * ? " < > |) with underscores and cuts the stem to 80 characters — type a:b and you download a_b.docx from a document still titled a:b. With two or more files selected this field is disabled, because each file uses its own name.

Word keeps a separate font slot for Chinese, Japanese and Korean characters — w:eastAsia in Office Open XML. This tool writes that slot alongside the Latin font on every run of text, so CJK characters mixed into your text do not fall back to boxes. In an all-Latin document the setting makes no visible difference. The font has to be installed on the machine opening the file, or Word will substitute another one.

Turn this on and the first non-empty line is lifted out, given Word's Title style, and only the rest is split into body paragraphs — that line is not repeated in the body. It changes a line inside the document, which is a different thing from Document title / file name above (that one only fills the file properties and the download name). The style name is all that is written: no outline level is set, so the line does not become an entry in Word's navigation pane or a table of contents, and its size stays the same as the body text.

Turn this on and a line that stands alone as its own paragraph, is no longer than 20 characters and does not end with a checked punctuation mark, such as a period or colon, gets Word's Heading 2 style. A paragraph with a line break inside it and a longer line stay body text. There is one level only — no nested heading levels, and no table of contents.

Paragraph preview (check before converting — 4 paragraphs)

Field notes from the harbor

The morning ferry was late again, so we waited on the pier and watched the gulls circle the fish market. Nobody minded much; the coffee stand had just opened.

Meeting notes

Plain text carries no styling at all, only words and line breaks, and that is exactly what this converter works from. Paste a chapter, a log excerpt or a pile of notes, keep an eye on the paragraph preview below, and download a Word document you can edit straight away.

What you see here is the split: each block becomes one paragraph in Word, and title and subheading blocks are drawn in a slightly larger type. It is here to confirm that the split is right, not to preview Word's layout — font, size, line spacing and where pages break have to be judged in Word itself.

🔒 The .docx is built in your browser, so your text is not uploaded and does not leave your device; the page does not remember your settings either.

How to use

  1. Paste your text or choose your files: Type or paste into the Plain text box — it opens with a short example you can replace. Or drop .txt, .text, .log, .md, .markdown or .csv files onto the box above it: up to 10 MB each, up to 50 files, 100 MB per batch. The drop zone stays on screen, so more files are added to the end of the list; click the ✕ on a row to take one out, and once the list is empty the text box comes back.
  2. Set the encoding and the paragraph mode: Leave Encoding on Detect automatically and the label shows what was detected; switch to UTF-8, GBK / GB18030 or UTF-16 if the preview looks wrong. Paragraph mode decides where paragraphs begin. Then set Document title / file name, page size, fonts, body size and line spacing, and turn on the two heading switches if you want them.
  3. Check the paragraph preview: The Paragraph preview under the settings is the real split: each block there becomes one paragraph in the .docx, and it counts the blocks for you. It is for structure only — the first 200 blocks are drawn, while the file you download is complete.
  4. Convert and save: Click Convert to Word, or Convert and pack when several files are selected, and use Download in the result card. On a phone, Save to device opens the system share sheet when the browser offers file sharing and otherwise downloads the file straight away. Changing any setting afterwards discards the result, so convert again.

How this TXT to Word converter works

TXT to Word takes plain text — pasted in, or read from .txt, .text, .log, .md, .markdown and .csv files up to 10 MB each — and writes an editable Word .docx. One file in gives one .docx; two or more give one .docx per file, packed into a single txt-to-word.zip. Up to 50 files per batch and 100 MB in total. Nothing is uploaded: the document is assembled on your device.

The path is short and entirely local. The page reads each file as raw bytes rather than as text, because the bytes are what the encoding detection needs, then decodes them with the browser's own TextDecoder, splits the result into paragraphs and assembles a standard Office Open XML package with docx.js 9.5.1 — the same container Word, WPS Office and Google Docs read. There is no server step for your content, no account, and no setting is remembered: close or reload the page and nothing is left behind. The one request involved is the converter code itself, which is fetched on the first conversion and cached after that; your text is not part of it.

Converting is a deliberate click, not a live export. Editing the text box, changing any setting, adding or removing a file, or pressing Clear discards the .docx that was generated before, so you can never download a file that disagrees with the settings on screen. The .docx and the .zip are both formats the result card cannot render, so it shows the file name with a note that the format can't be previewed here and a download button — open the file in Word to see it.

One detail is worth knowing before you download. The download name is built from the resolved document title: what you typed in Document title / file name, or else the name of the file you picked without its extension, or else document for pasted text. The file properties keep the title after leading and trailing whitespace is removed; filename-only characters such as colons are preserved. The download name goes one step further and replaces the characters a file name cannot hold with underscores, then cuts the stem to 80 characters. Type a:b and you download a_b.docx from a document still titled a:b.

Getting the encoding right so the text is not garbled

Check the text preview before converting. This converter supports UTF-8, UTF-16 and GB18030; if another encoding is used, reopen the file with the correct encoding in your editor and save it as UTF-8. With detection left on and a file selected, the Encoding label says what it settled on — detected as utf-8, utf-16le, utf-16be or gb18030 — so you can see which branch was taken before you press the button.

Decoding never raises an encoding error. Bytes that do not fit become the U+FFFD replacement character and travel straight into the document — the conversion is not blocked. The page watches for that instead: when replacement characters make up more than one in two hundred characters of the preview text, a warning tells you the guess was probably wrong and asks you to choose an encoding. Two limits on that warning are worth knowing. It is judged on the preview text, which is the first selected file or the text box, so a garbled second, third or fiftieth file in a batch is not flagged. And a wrong guess can produce no replacement characters at all, in which case nothing is flagged — only the preview itself will tell you.

A UTF-16 file with no byte order mark is the one case where the outcome splits in two, and the dividing line is whether there is a null byte in the first 4096 bytes rather than how short the file is or whether it is all Chinese. UTF-16 spells out spaces, line breaks, Latin letters and digits with a null byte each, so most such files hit the binary guard and come back refused as not plain text. Without a null byte in those first 4096 bytes, though, the file passes that guard. It is then decoded as UTF-8 if its bytes are valid UTF-8, otherwise as GB18030; either choice can misread the original text. Either way the fix is the same: set Encoding to UTF-16, which skips the null-byte scan and reads the file as little-endian unless it starts with a big-endian mark. Big5 and Shift-JIS have no option here; re-save those as UTF-8 first.

The technical reason detection surprises people: what picks the branch is the bytes themselves, not the encoding the file was saved in. Tested here, one GBK character stored as C2 A1 is also a valid UTF-8 sequence, so the file is read as UTF-8 and comes out as an inverted exclamation mark with no replacement character anywhere; two other GBK characters, stored as D6 D0 CE C4, really are invalid UTF-8, fall back to GB18030 and come out right. Latin-1 behaves the same way in both directions: C3 A9 passes the check and is read as an accented e, while the Latin-1 spelling of cafe with an accent ends in a truncated sequence, fails the check and falls back to GB18030 with a replacement character in place of the last letter. Length changes nothing — the same two mis-read Chinese characters repeated a thousand times take exactly the same branch.

What you haveWhat automatic detection doesWhat to do
A file saved as UTF-8, with or without a BOMReads it as UTF-8Nothing — this is the normal case
Chinese text saved as ANSI in NotepadFalls back to GB18030 only if the bytes fail the UTF-8 check; bytes that pass are read as UTF-8 and quietly come out as other charactersCheck the preview; if it looks wrong, choose GBK / GB18030
UTF-16 with a byte order markReads the mark and decodes as utf-16le or utf-16beNothing
UTF-16 with no byte order markRefused as not plain text when the first 4096 bytes hold a null byte. Otherwise decoded as UTF-8 if valid, or GB18030 if not; the original UTF-16 text can be misreadChoose UTF-16
Big5, Shift-JIS, KOI8 or Latin-1May be misread, may be refused — the bytes decideRe-save as UTF-8 in your editor first

The encoding branch is chosen from the bytes, not from the encoding the file was written in.

How plain text is split into Word paragraphs

Plain text has no paragraphs, only characters and line breaks, so the split has to be guessed and you get to pick the guess. Blank line starts a paragraph treats an empty line (or a line holding only spaces) as the break, and keeps the line breaks inside a block as Word soft line breaks, so a postal address or a stanza stays one paragraph with its own line layout. One paragraph per line makes every line its own paragraph and drops the empty ones. Smart, the default, splits on blank lines first; if that leaves a single non-empty block and that block holds at least three line breaks, it splits that block into one paragraph per line — which is exactly the one-entry-per-line log that would otherwise arrive as a single wall of text. Blank lines at the very start or end of the file do not prevent that switch, because empty blocks are dropped before the count; and a block with only two line breaks stays one paragraph.

Consecutive blank lines collapse into one break and produce no empty paragraph, whichever mode you use. This is worth stating plainly, because other converters promise the opposite: if you used three blank lines as a scene break, that gap is gone in the .docx and you will want a real page break or a separator line in Word instead. Windows CRLF and old Mac CR line endings are normalized to LF before the split, so a file saved on Windows does not gain doubled breaks.

Whitespace is trimmed per block, not per line, and the difference shows up in exactly one place. Leading and trailing whitespace is removed from the whole block, so in a multi-line block only the very start of the first line and the very end of the last line lose their spaces: ASCII tables, indented code and hanging indents inside the block survive. In One paragraph per line, however, every line is its own block, so every line loses its own leading and trailing spaces — the classic two-space paragraph indent disappears in that mode. Keeping the indentation of every single line is not something this converter can do.

The Paragraph preview is the same splitter the conversion uses, not a second implementation, so the number of blocks and where they begin is what you will find in Word. It draws the first 200 blocks and says so when there are more; the downloaded file is never truncated. What the preview is not is a layout preview — fonts, sizes, line spacing and where pages break have to be judged in Word itself.

Your text looks likePickWhat you get
An article or chapter with blank lines between paragraphsSmart, or Blank line starts a paragraphOne Word paragraph per block, with soft line breaks inside it
A log or export with one entry per line and no blank linesSmartFalls back to one paragraph per line, because there are at least three line breaks
An address list, a poem or a checklist where each line mattersOne paragraph per lineEvery line is a paragraph, and each line's own leading spaces are trimmed
A couple of lines with no blank line between themOne paragraph per lineSmart keeps it as a single paragraph here — fewer than three line breaks is below its fallback threshold

Which paragraph mode fits which kind of text file.

If your text turns out to have # headings, tables or lists that should become real Word structure, those are markup and this page writes them as literal characters — use Markdown to Word Converter instead.

Converting a folder full of text files at once

Select two or more files and the page switches to batch mode: the button reads Convert and pack, the list shows how many files are queued, and Document title / file name is disabled because each file uses its own name. Every file is converted on its own, in list order, with the same encoding, paragraph mode, fonts and spacing, and the finished documents are zipped into one txt-to-word.zip. Two guards decide what gets in: at most 50 files, and at most 100 MB across the batch. Files beyond the count are not added and the page says so, and files that would push the total over the limit are skipped one by one with a count — larger ones can be skipped while smaller ones later in the list still fit. Nothing is dropped silently.

A single bad file does not stop the rest. The converter records which file failed and why, carries on with the next one, and puts the successful documents in the archive; a notice then names up to three of the files that failed, with the reason. If every file fails there is no archive at all, only that message. One failure mode does take everything with it, though: if the zipping step itself fails after the documents were built, the page reports that the document could not be generated and nothing is downloadable, so there is no partial archive to salvage.

Names inside the archive are the source file names with .docx in place of the old extension, cleaned up on the way in. Control characters are removed, trailing dots and spaces are stripped, and the stem is cut to 120 UTF-16 code units; a name that cleans up to nothing becomes a fallback stem, and a name matching a reserved Windows device name such as CON or NUL gets an underscore in front. Duplicates do not overwrite each other — the second gets (2) appended, and names that differ only in capitalization count as duplicates — so notes.txt and notes.log arrive as notes.docx and notes (2).docx. That suffix and the extension are added after the 120-unit cut, so a de-duplicated entry name can run a few characters longer.

Folders are allowed: drop one onto the box and it is walked recursively, so a year of exported chat logs can go in at once. If your browser can only read part of what you dropped, the whole drop is refused and the unreadable items are named, on the principle that part of a folder is not the folder. Files whose extension is not accepted, or that are over 10 MB, are filtered out one by one with a count, and the files that do qualify are added as usual.

What the .docx keeps, what it changes, and what it will not do

The text itself comes through as Unicode, untouched: Chinese, Japanese and Korean characters, emoji and Vietnamese tone marks all survive, provided the encoding was read correctly. Line breaks inside a paragraph become real Word soft line breaks rather than new paragraphs. Characters that matter to XML, such as < > and &, are escaped properly and do not damage the file. Nothing identifying you is written — the author field in the file properties is left at the converter library's own placeholder, not your name.

Word keeps a separate font slot for Chinese, Japanese and Korean characters, and setting only a Latin font is the usual reason CJK text turns into boxes elsewhere. This converter writes both slots on every run of text, so the Latin font — Calibri by default, with Arial, Times New Roman and Georgia available — covers Latin letters while the East Asian font covers CJK characters, with SimSun by default and Microsoft YaHei, DengXian, FangSong, SimHei and KaiTi available. Fonts are referenced, not embedded, so if you pick KaiTi and the person opening the file has not installed KaiTi, Word substitutes something else. In an all-Latin document the setting makes no visible difference.

The layout you can control is page size (A4 at 11906 by 16838 twips, or Letter at 12240 by 15840, both portrait), body size (10.5, 12, 14 or 16 pt, 12 by default) and line spacing (single, 1.5 or double). The rest is fixed: one-inch margins on all four sides and 6 pt of space after each paragraph, with no control for either, and no first-line indent.

Title and subheading lines use the body font size. That is the plain warning the two heading switches deserve, because they do less than their names suggest: First line as a title lifts the first non-empty line out and gives it Word's Title style, Treat short lines as subheadings gives qualifying lines Heading 2, and in both cases only the style name is written. Every run of text, headings included, carries an explicit font size, and direct formatting beats a style in Word.

Short-line detection requires one line of no more than 20 Unicode code points. The line also has to stand alone as its own paragraph and must not end with one of the punctuation marks checked by this tool, such as a period or a colon. Note that an emoji can take several code points, so twenty visible emoji may be over the limit; other punctuation, such as an em dash, does not prevent heading detection.

To enlarge a heading, select it in Word and change its font size directly — editing the Title or Heading 2 style will not win against the direct formatting. Heading 2 does inherit its blue color from the style; the Title line stays black and unbolded. Tested on the output, no paragraph carries an outline level and neither do the style definitions, so those lines will not show up as entries in Word's navigation pane or in a table of contents.

Finally, what this page will not do. It does not read markup of any kind: #, **bold** and | table | arrive as literal characters. It produces no table of contents, page numbers, headers, footers, page breaks, columns, tables or bullet lists, because plain text carries none of that, and a line starting 1. stays ordinary text rather than becoming Word numbering. There is no password, watermark or usage limit on the output, and no cancel button once a conversion starts. A file that is not really text is caught by the converter's own guard rather than guessed from its extension: it refuses content starting with the ZIP/OOXML, %PDF, PNG, GIF, OLE2 or JPEG signatures, and — except when the encoding in use is UTF-16, whether from the file's byte order mark or because you chose it — content with a null byte in its first 4096 bytes. That covers a .docx or a PDF renamed to .txt, and usually covers a WebP, BMP, MP3 or 7z too, but it is not a blanket promise: a file whose first 4096 bytes hold no null byte, or one converted with UTF-16 selected, is treated as text and produces a document full of garbled characters.

Going the other way — a Word document you want back as plain text — is Word to TXT Converter, and it is also what to use when this page refuses a .docx you renamed to .txt.

How this tool is checked

  • The logic behind this tool is covered by 44 automated test cases (hand-checked examples, edge cases and invalid input), and they run again before every release.
  • Before each release, a real browser opens this page, runs it on sample files (including a damaged one) and checks the file it produces.
  • Your files are processed in your browser and are never uploaded to our server.
  • Formulas, figures and definitions are checked against the sources listed at the end of this page.

How we build and test our tools →

Frequently asked questions

Is my text uploaded to a server?
No. The file is read, decoded and packed into a .docx inside your browser, with no server step for your content. Nothing is stored either, so closing or reloading the page leaves nothing behind. The only request involved is the converter code itself, fetched once on the first conversion.
Why does my Chinese or accented text come out garbled?
Because the encoding was guessed from the bytes and the guess was wrong. A .txt file does not record its own encoding, so detection checks for a byte order mark, then whether the file is valid UTF-8, and otherwise falls back to GB18030. Set Encoding to UTF-8, GBK / GB18030 or UTF-16 yourself and the preview will show whether it reads correctly.
How do I batch convert TXT files to Word?
Select up to 50 text files, with no more than 10 MB per file and 100 MB in total, then click Convert and pack. You get one .docx per file inside a single txt-to-word.zip, and files over the count or the total are skipped with a count rather than silently dropped. Dropping the folder that holds them works as well — it is walked recursively, subfolders included.
Does it keep my line breaks and blank lines?
Line breaks inside a paragraph are kept as Word soft line breaks, so addresses and poems hold their shape. Blank lines are a different matter: they act as the paragraph break and several in a row collapse into one, producing no empty paragraph. If you used blank lines as a visible gap, add a page break or separator in Word afterwards.
Why isn't the first line bigger in Word after I turned on the title switch?
Because only the style name is written, not a larger size. Every run of text carries an explicit font size, and in Word direct formatting beats a paragraph style, so the Title and Heading 2 lines come out at body size. They also carry no outline level, so they do not appear in the navigation pane or a table of contents. Restyle those lines in Word.
Can I convert a Word document back to plain text here?
Not on this page — it only goes from plain text to Word. A .docx renamed to .txt is refused, because the converter recognizes the ZIP signature every .docx starts with and reports that the content is not plain text. Use the Word to TXT tool for that direction.
Which files can I pick besides .txt?
The drop zone accepts .txt, .text, .log, .md, .markdown and .csv, plus anything the browser reports as text/plain. Note that .md is read as plain text only: # headings, lists and tables become literal characters rather than Word structure, so use the Markdown to Word tool if you want real headings and tables.
What happens if one file in a batch fails?
The rest still convert. The failed file is left out of the archive and the page names up to three failures with the reason. If every file fails there is no archive at all. One exception: if the zipping step itself fails, the page reports a generation failure and nothing can be downloaded.

Add this tool to your website

Free for any website, personal or commercial. Paste the code where you want the tool to appear — it works on WordPress, Blogger, Google Sites, Notion and plain HTML.

<div class="gingertool-widget" data-embed="https://gingertool.com/embed/en/file-tools/txt-to-word/" data-height="640" style="font-size: 13px; line-height: 20px; margin: 6px 0 16px; text-align: left">TXT to Word Converter &#183; <a href="https://gingertool.com/en/file-tools/txt-to-word/">Gingertool</a></div>
<script src="https://gingertool.com/embed.js" async></script>

Please keep the credit link below the tool. Embedded tools show no ads.

Step-by-step: Google Sites · Blogger · WordPress · Notion

Cite this tool

Using a result in a report, paper or assignment? Copy a ready-made reference.

APA
Gingertool. (2026). TXT to Word Converter [Online tool]. Retrieved December 2, 2026, from https://gingertool.com/en/file-tools/txt-to-word/
MLA
“TXT to Word Converter.” Gingertool, December 2, 2026, https://gingertool.com/en/file-tools/txt-to-word/. Accessed December 2, 2026.
BibTeX
@misc{gingertool-txt-to-word,
  author = {{Gingertool}},
  title = {TXT to Word Converter},
  year = {2026},
  url = {https://gingertool.com/en/file-tools/txt-to-word/},
  note = {Accessed: 2026-12-02}
}