Browser-based document converter · TXT to DOCX

TXT to Word Converter

Makes a Word document from plain text, with three ways to turn line breaks into paragraphs and automatic list detection.

Input

Text files (.txt), up to 25MB

Drop your TXT file here or click to choose

.txt, .text, .log

or paste

Files are read and converted on your device. Nothing is uploaded, and the result is yours to download or open in the Word editor.

Result

DOCX file, ready to download or edit

Choose a file to see the DOCX result here.

TXT to Word Converter

Operator: Abdulla Al Fahad. How tools are built and checked

A .txt file has no formatting, which makes the only real question how its line breaks should become Word paragraphs. Text exported from email, terminals and older programs is hard-wrapped at 70 or 80 characters, with a blank line between paragraphs. Text from a notes app usually puts each paragraph on one long line. Lyrics, poems and addresses need every line break kept. The TXT to Word Converter lets you choose between those readings and shows the result before you download.

The choice is made with the Paragraphs option above the result, and it reruns the conversion instantly, so the practical approach is to drop the file, read the first screen of the preview and switch modes until sentences are neither glued together nor split in the middle. Lines that begin with a dash, asterisk, bullet or number are treated as list items in every mode, so a to-do list or an agenda arrives as a Word list rather than as paragraphs that start with punctuation.

Key features

  • Three paragraph modes: join wrapped lines, keep line breaks, or one paragraph per line, switchable after the fact.
  • Turns lines starting with -, *, •, 1. or 1) into bulleted or numbered Word lists, with two spaces or a tab per nesting level.
  • Detects UTF-8, UTF-16 and Windows-1252 (ANSI) encodings and normalises Windows and Mac line endings.
  • Collapses stray runs of spaces and tabs inside lines without touching the words.
  • Accepts a pasted snippet as well as .txt, .text and .log files.

How line breaks become paragraphs

Three paragraph modes are offered. Blank line starts a paragraph, lines are joined is the default: consecutive lines belong to one paragraph and are joined with spaces, so hard-wrapped text flows naturally in Word. Blank line starts a paragraph, keep line breaks groups lines the same way but keeps each line break inside the paragraph, which suits addresses, poems and song lyrics. Every line is a paragraph turns each non-empty line into its own paragraph, which suits logs, lists of names and text where every line is already a complete unit.

In every mode a line that begins with -, *, •, or a one- to three-digit number followed by a dot or bracket, then a space, becomes a list item. Dashes and bullets give a bulleted list; numbers give a numbered list that Word renumbers from 1. Every two spaces of indentation before the marker, or one tab, moves the item one level deeper. Blank lines separate paragraphs, leading and trailing spaces are trimmed, runs of spaces are collapsed and tabs inside a line become single spaces. No headings are created, since plain text has no way to mark them.

Encoding is detected from the bytes. A UTF-8 or UTF-16 byte-order mark is honoured, UTF-8 is tried first, and a file that is not valid UTF-8 is read as Windows-1252, which is what Notepad calls ANSI. That keeps é, –, and curly quotes intact in files from older Windows programs. Windows and classic Mac line endings are normalised before the lines are read.

How it works

The file bytes are decoded with a byte-order-mark check, a strict UTF-8 attempt and a Windows-1252 fallback. The text is split into lines; each line is classified as blank, list item or text. Text lines are grouped into paragraphs according to the selected mode, list lines become list blocks whose level comes from their indentation.

Changing the Paragraphs option runs the conversion again from the file you dropped, which stays in the browser's memory, so you can compare the three modes without choosing the file a second time.

Common use cases

  • A transcript saved as .txt by a recording tool needs to go to a client as a Word document.
  • Notes exported from a phone app, one paragraph per line, become a document that can be formatted and printed.
  • A README.txt shipped with software is converted so the technical writer can edit it with styles.
  • Song lyrics or a poem are converted with line breaks kept so every line stays on its own line in Word.
  • A server log is converted with every line as a paragraph so an incident report can quote and annotate entries.

How to use this tool

  1. Drop a .txt file on the upload area, or paste text and choose Convert text.
  2. Compare the first paragraphs of the preview with the original. If sentences were joined or split in the wrong places, change the Paragraphs option.
  3. Confirm that list lines became bullets or numbers, and that indented items nest under their parents.
  4. Download the .docx, or choose Edit in Word editor to add a heading and formatting.

Example

Text file (hard-wrapped, with a list)

Meeting notes - 14 March

We agreed to move the launch to the second
week of April so the documentation team has
time to finish the guides.

Action items:
- Priya books the venue
- Tom sends the revised budget to finance

Word document (default mode)

Paragraph: Meeting notes - 14 March
Paragraph: We agreed to move the launch to the second week of April so the documentation team has time to finish the guides.
Paragraph: Action items:
Bullet: Priya books the venue
Bullet: Tom sends the revised budget to finance

Tips for best results

  • Hard-wrapped text from email or terminals converts best with the default mode, which joins the wrapped lines back into paragraphs.
  • Use keep line breaks for anything where the line itself matters: addresses, poetry, code snippets, chat transcripts with one message per line.
  • Start list lines with - or 1. followed by a space. Indent sub-items by two spaces or a tab so they become a nested list.
  • If the file is really tabular data separated by commas or tabs, the CSV to Word converter on this site will give you a proper table instead of paragraphs.
  • Files that mix hard-wrapped paragraphs with one-line paragraphs convert cleanly in the default mode as long as a blank line separates the paragraphs.

Edge cases to watch

A file without any blank lines becomes one long paragraph in the default mode, because there is nothing to mark where paragraphs end. Switch to Every line is a paragraph for such files.

Lines beginning with a dash that are not list items, such as dialogue written with leading dashes, are turned into bullets. Change them back to normal text in the Word editor.

A line that starts with a one- to three-digit number and a dot or bracket, such as 3. Agenda, becomes a numbered item. Four-digit years do not, so 2024. Annual summary stays a paragraph.

Leading indentation is removed. Text indented with spaces to form columns loses that alignment, since Word paragraphs do not keep leading spaces in a meaningful way.

No headings are detected. A title on the first line stays a normal paragraph; set it to Heading 1 in the Word editor after converting.

Encodings other than UTF-8, UTF-16 and Windows-1252, for example Shift JIS or KOI8-R, are not detected and will show wrong characters. Re-save the file as UTF-8 in a text editor first.

Frequently asked questions

Why did all my text end up in one paragraph?

The default mode joins consecutive lines and only starts a new paragraph at a blank line. If your file has no blank lines, choose Every line is a paragraph instead.

Can it recognise headings?

No. Plain text has no reliable way to mark a heading, so every non-list line becomes a normal paragraph. Open the result in the Word editor and apply Heading 1 or Heading 2 where you need them.

My accented letters show as strange symbols. What happened?

The file is probably in an encoding other than UTF-8 or Windows-1252. Open it in a text editor, save it as UTF-8 and convert again.