Convert TXT to Markdown

Convert a plain text file into Markdown that renders the way the text reads, with lists detected and stray formatting characters escaped.

Drop your file here, or browse

Images, documents, spreadsheets, data files and subtitles. Your file stays on your device.

Your file is converted on this device and is never uploaded to a server.

Why plain text needs converting to Markdown

Most plain text is almost valid Markdown, and that is exactly the problem. An asterisk around a word turns it italic, a line starting with a number and a period becomes a numbered list, a line of dashes turns the text above it into a heading, and single line breaks disappear when the Markdown is rendered.

This converter makes the text render as written. It keeps your line breaks, preserves paragraphs, turns lines that already look like lists into real Markdown lists and escapes the characters that would otherwise trigger accidental formatting.

TXT vs Markdown at a glance

Main differences between the TXT and Markdown formats
FeatureTXTMarkdown
Full namePlain text fileMarkdown
TypeUnformatted textLightweight markup in plain text
IntroducedAs old as computing (ASCII dates from 1963)2004
Created byNo owner; based on the ASCII and Unicode standardsJohn Gruber with Aaron Swartz; CommonMark spec since 2014
FormattingNone: characters and line breaks onlyHeadings, lists, links, emphasis, code and tables
PagesNo page conceptNo page concept
Best forNotes, logs and text any program can openREADMEs, documentation, notes and static sites
SupportUniversal: every browser, operating system and editorGitHub, GitLab, note apps and static site generators
MIME typetext/plaintext/markdown

How to convert TXT to Markdown

  1. Step 1: Select a .txt file

    Drop notes, a draft or an exported document onto the converter.

  2. Step 2: Markdown is preselected

    Leave the output as Markdown (.md).

  3. Step 3: Convert

    Lines are analyzed one by one, escaped where needed and joined into paragraphs and lists.

  4. Step 4: Download the .md file

    Open it in Obsidian, VS Code, GitHub or any Markdown editor.

What the conversion takes care of

Line breaks preserved

Consecutive lines in a paragraph are joined with Markdown hard breaks.

Lists recognized

Lines starting with -, *, + or a short number like 1. become list items.

Accidental syntax escaped

Characters like *, `, [ and leading # are escaped with a backslash.

Clean spacing

Blank lines are normalized so paragraphs and lists render reliably.

Where TXT to Markdown helps

  • Importing notes. Bring old text notes into Markdown-based apps without layout surprises.

  • Documentation. Start a README or wiki page from a plain text draft.

  • Static sites. Prepare plain copy for Hugo, Jekyll or Astro content folders.

  • Git-friendly writing. Markdown diffs cleanly and renders on GitHub and GitLab.

What gets escaped and why

Inline characters that start formatting, namely asterisks, backticks, square brackets, backslashes and opening angle brackets, are escaped everywhere. Underscores are escaped only at the start or end of words, since Markdown ignores them inside words like file_name.

At the start of a line, the converter escapes a # that would make a heading, a > that would make a quote, a line made only of = or - characters that would create a heading or divider, and long numbers followed by a period, such as a year, that would otherwise start a numbered list.

  • *important* stays literal as \*important\*
  • # not a heading becomes \# not a heading
  • 2024. A good year keeps its number as text

What the converter does not guess

Plain text has no reliable signal for headings, bold text or tables, so the converter does not invent them. A line in capital letters stays a normal paragraph. Add headings with # and emphasis with asterisks after converting, where you intend them.

Indented blocks of four or more spaces after a blank line are treated by Markdown as code blocks, which is usually what you want for pasted code.

Tips for text to Markdown

  • Put a blank line between paragraphs in your text file before converting.
  • Use dashes for bullet points in the text; they come through as proper lists.
  • Add your own headings after converting to structure long notes.
  • Preview the result with Markdown to HTML to confirm it renders as expected.

TXT to Markdown questions

Why do my line breaks disappear in other converters?

Markdown joins consecutive lines into one paragraph. This converter adds hard line breaks so each line stays on its own.

Will my bullet points become a list?

Yes. Lines starting with -, * or + followed by a space, or with a number and a period, become list items.

Why are there backslashes in the output?

They escape characters that would otherwise add formatting. Markdown viewers hide them and show the character as typed.

Does it detect headings?

No. Plain text has no dependable heading markers, so you add them yourself with #.

What encoding is used?

The output is UTF-8, the standard for Markdown tools.

Is anything uploaded?

No. The file is converted in your browser.

Related conversions