Skip to content

Rich Text to Markdown: Clean Conversion From Word and Docs

Why Convert Rich Text to Markdown?

Rich text editors like Google Docs, Microsoft Word, and Notion produce beautifully formatted documents. But that formatting is locked inside the application — tied to proprietary formats (.docx, .gdoc), difficult to version-control, and impossible to use with static site generators, GitHub, or Markdown-based documentation platforms.

Convert rich text to clean Markdown with WritePadPro's Rich Text to Markdown — copy formatted text from any application, paste it into the tool, and get clean Markdown syntax ready for Git, Jekyll, Hugo, or any Markdown platform.

Rich-text-to-Markdown conversion extracts the content and structure from formatted documents and expresses them in portable, plain text Markdown. The result is a file that works everywhere, diffs cleanly in Git, is usually much smaller than the original document file, and stays readable without special software. For the reverse direction, see our Markdown to Rich Text Guide.

Common Conversion Scenarios

Google Docs to Static Site

A content team writes blog posts in Google Docs for collaborative editing (comments, suggestions, real-time collaboration). When posts are approved, they need to be published on a Jekyll, Hugo, or Gatsby site that expects Markdown files. Converting the Google Docs content to Markdown produces files ready for the static site build pipeline.

Word Documents to GitHub

Technical documentation written in Word needs to be published on GitHub Wiki or a docs-as-code platform. Word's .docx format is a binary ZIP archive that produces meaningless Git diffs. Converting to Markdown creates plain text files with clean, reviewable version history.

CMS Content to Markdown Archive

When migrating away from a rich text CMS (WordPress visual editor, Squarespace, Wix), the content is stored as rich text or HTML. Converting to Markdown creates a portable archive that works with any future platform. For the complete Markdown syntax, see our Markdown Complete Guide.

Meeting Notes to Documentation

Notes taken in Google Docs or Notion during meetings need to be added to a Markdown-based knowledge base (Obsidian, MkDocs, GitBook). Converting preserves the structure (headings, lists, action items) while discarding the rich text formatting that the knowledge base does not need.

Email Drafts to Blog Posts

Writers who draft in Gmail or Outlook can convert their rich text drafts to Markdown for publishing on Markdown-native platforms. The conversion extracts headings, links, bold text, and lists while stripping email-specific formatting.

How the Conversion Works

Rich-text-to-Markdown conversion reverses the Markdown-to-rich-text pipeline. It takes formatted content and extracts the underlying structure as Markdown syntax.

Step 1: Capture Rich Text as HTML

When you copy formatted text from Google Docs, Word, or any rich text editor, the application places HTML on your system clipboard (in the "text/html" MIME type). This HTML contains the formatting information: <h2> for headings, <strong> for bold, <a href="..."> for links.

Step 2: Parse the HTML

The converter reads the clipboard HTML and builds a document structure. It identifies headings, paragraphs, bold/italic spans, links, lists, code blocks, blockquotes, and tables.

Step 3: Map to Markdown Syntax

Each HTML element is converted to its Markdown equivalent using the standard mapping: <h2> becomes ##, <strong> becomes **, <a href="url">text</a> becomes [text](url), and so on.

Step 4: Clean Up

Rich text editors produce verbose, often messy HTML. Google Docs wraps every paragraph in <p> tags with inline styles. Word produces HTML with Microsoft-specific XML namespaces. The converter strips these application-specific artifacts and produces clean, minimal Markdown.

Handling "Dirty" HTML From Word and Docs

The biggest challenge in rich-text-to-Markdown conversion is the quality of the intermediate HTML. Different applications produce dramatically different HTML.

Google Docs HTML

Google Docs produces relatively clean HTML but includes inline styles on every element: <p style="font-size:11pt;font-family:Arial;color:#000000">. The converter must ignore all inline styles and extract only structural information (is this a heading, a list item, or a paragraph?).

Microsoft Word HTML

Word produces notoriously verbose HTML. A simple bold word may generate: <span class="MsoNormal" style="font-family:Calibri;mso-bidi-font-family:Times New Roman;font-weight:bold;mso-bidi-font-weight:normal">bold</span>. Good converters strip all Microsoft-specific classes (Mso*), XML namespaces, and redundant span wrappers to extract the clean content.

Notion HTML

Notion's HTML tends to be cleaner, with proper heading tags, list structures, and code blocks. It often converts to Markdown more reliably than Word or Docs because Notion's internal format is already block-structured, much like Markdown.

Common Cleanup Issues

  • Extra blank lines: Rich text editors often produce paragraphs with margin spacing, which converts to excessive blank lines in Markdown
  • Span soup: Formatting applied character-by-character (changing font, then size, then color) produces nested spans that must be unwrapped
  • Smart quotes: Curly quotes are valid in Markdown, so WritePadPro keeps them. Convert them to straight quotes only if your tools expect plain ASCII
  • Non-breaking spaces: Word processors insert non-breaking spaces that become &nbsp; in HTML and need to be converted to regular spaces; WritePadPro's converter does this for you

For converting rich text to HTML instead of Markdown, see our Rich Text to HTML Guide. Use the Rich Text to Markdown converter for clean results.

What Converts Well and What Does Not

Converts Cleanly

  • Headings — H1 through H6 map directly to # through ######
  • Bold and italic — strong/b becomes **, em/i becomes *
  • Links — anchor tags with href become [text](url)
  • Ordered and unordered lists — including nested lists with proper indentation
  • Blockquotes — blockquote tags become > prefixed lines
  • Horizontal rules — hr tags become ---

Converts With Loss

  • Font changes — Markdown has no font control. Custom fonts are stripped.
  • Text colors — Markdown has no color support. All text becomes default color.
  • Text alignment — center and right alignment have no Markdown equivalent.
  • Page layout — columns, text boxes, and positioned elements are flattened to linear text.
  • Tables — the first row becomes the header row. Merged cells are padded with empty cells, so the merge itself is lost.
  • Images — images with an http or https address, a site path, or embedded PNG, JPEG, GIF or WebP data convert to ![alt](url). Images that Word references from a file on your computer are left out.

Does Not Convert

  • Comments and tracked changes — Word/Docs revision history is lost.
  • Headers and footers — document metadata sections are stripped.
  • Table of contents — an auto-generated TOC comes across as plain text or links, not a live table of contents (many Markdown tools can generate their own).
  • Charts and drawings — embedded graphics require separate export.

Best Practices for Clean Conversion

1. Format Structurally, Not Visually

Use heading styles (Heading 1, Heading 2) instead of manually bolding and enlarging text. Use bullet list formatting instead of typing hyphens. Use the link insertion tool instead of typing URLs. Structural formatting converts to Markdown cleanly. Visual formatting (manually sized text, colored text, custom spacing) is lost.

2. Avoid Complex Table Formatting

Simple tables with headers and data rows convert well. Tables with merged cells, colored cells, or nested tables convert poorly or not at all. Keep tables simple for the best Markdown output.

3. Use Built-In Styles

Google Docs and Word have built-in heading styles (Heading 1, Heading 2, etc.) that map directly to Markdown heading levels. Documents formatted with built-in styles convert more accurately than those formatted manually.

4. Clean Up Before Converting

Remove extra blank lines, trailing whitespace, and formatting inconsistencies in the rich text editor before converting. The cleaner the source, the cleaner the Markdown output.

5. Review and Edit After Converting

Always review the Markdown output for formatting artifacts, broken links, missing emphasis, and structural issues. A 5-minute review after conversion catches problems that would take longer to debug later. For related rich text export, see the Rich Text to HTML Converter.

Using WritePadPro's Rich Text to Markdown Converter

WritePadPro's Rich Text to Markdown extracts Markdown from any formatted text.

Step 1: Copy Formatted Text

In Google Docs, Word, Notion, email, or any rich text editor — select and copy (Ctrl+C / Cmd+C) the formatted content you want to convert.

Step 2: Open the Tool

Navigate to the Rich Text to Markdown.

Step 3: Paste

Paste (Ctrl+V / Cmd+V) into the input area. Click the white input box first. The formatting appears visually, and the tool reads the HTML behind it — including formatting, links, and structure.

Step 4: View Markdown Output

The converter processes the clipboard HTML, strips application-specific artifacts, maps elements to Markdown syntax, and displays the clean Markdown result in the Markdown tab. The Source HTML tab shows the raw HTML that was pasted, which helps when a result looks wrong.

Step 5: Copy and Use

Click Copy Markdown or Download .md (Clear resets the input). Use the Markdown in Git repositories, static site generators, documentation platforms, note-taking apps, or any Markdown-supporting system.

Privacy

All conversion runs locally in your browser. Your clipboard content is processed entirely on your device and never transmitted to any server.

Summary

Rich-text-to-Markdown conversion extracts content and structure from formatted documents (Google Docs, Word, Notion, email) and expresses them in clean, portable Markdown syntax. The process captures clipboard HTML, parses the document structure, maps elements to Markdown syntax, and strips application-specific formatting artifacts.

Core elements (headings, bold, italic, links, lists, blockquotes) convert cleanly. Visual formatting (fonts, colors, alignment) is lost because Markdown has no equivalent. Complex elements (merged tables, embedded charts, tracked changes) require manual handling.

Convert rich text to Markdown with WritePadPro's Rich Text to Markdown — paste from any application and get clean Markdown instantly. For the complete Markdown syntax reference, see our Markdown Complete Guide.

Frequently Asked Questions

Can I convert Google Docs directly to Markdown?

Yes — copy the formatted content from Google Docs (Ctrl+A to select all, Ctrl+C to copy), then paste into WritePadPro's Rich Text to Markdown Converter. The tool reads the HTML that Google Docs places on your clipboard and converts it to clean Markdown. This method preserves headings, bold, italic, links, lists, and blockquotes. Font choices, text colors, and alignment are stripped because Markdown has no equivalents. For the best results, use Google Docs' built-in heading styles rather than manually formatting text as large/bold.

Does the conversion preserve images from Word or Docs?

It depends on what your browser puts on the clipboard. WritePadPro converts images whose address is http or https, a site path starting with /, or embedded PNG, JPEG, GIF or WebP data into Markdown image syntax: ![alt](url). Images that Word references from a file on your computer are left out, because that path would not work anywhere else. Images copied from a web-based editor may point to that service's servers, so download and host them yourself if you need them to last, then add the Markdown image references manually: ![description](path/to/image.jpg).

Why does Word produce such messy HTML?

Microsoft Word generates verbose HTML because it tries to preserve every visual detail of the document — fonts, spacing, styles, margins, page layout, and Microsoft-specific formatting metadata. A simple bold word can generate 100+ characters of HTML with Mso-prefixed classes, XML namespaces, and redundant style declarations. This 'Round-trip HTML' is designed so that re-opening the HTML in Word reproduces the exact original formatting. For Markdown conversion, all of this extra markup is noise that must be stripped. WritePadPro's converter handles this cleanup automatically.

What formatting is lost when converting to Markdown?

Markdown is intentionally limited in formatting. The following are lost during conversion: underline and font choices (Markdown has no underline syntax and uses the renderer's default font), text colors (all text becomes the default color), text alignment (center and right alignment have no Markdown equivalent), custom spacing (line spacing, paragraph spacing are controlled by the Markdown renderer), page layout (columns, text boxes, positioned elements flatten to linear text), and comments/tracked changes (revision history is discarded). All textual content, document structure (headings, lists), emphasis (bold, italic), links, and code blocks are preserved.

Try These Tools

Related Articles