# Markdown to Word > Turn Markdown into a formatted Word (.docx) document, entirely in your browser. Your files are never uploaded. Free · Open source · 100% in your browser. Convert at https://md2word.app/ ## How it works 1. **Paste or drop:** Paste Markdown, or drag in a .md file or choose one. 2. **Convert:** It converts in your browser: no server, no waiting. 3. **Download:** Save the .docx, or copy formatted text straight into Word or Google Docs. ## What gets converted | Markdown | In Word | | --- | --- | | `# Heading` | Heading 1–6 styles | | `**bold** *italic*` | Bold & italic | | `~~text~~` | Strikethrough | | `- item · 1. item` | Bulleted & numbered lists | | `- [x] task` | ☒ / ☐ checklist items | | `\| a \| b \|` | Bordered tables with a repeating header row | | `[text](url)` | Clickable links | | ```` `code` · ``` ```` | Code in a monospace font | | `> quote` | Indented block quotes | | `---` | A line across the page | ## Going the other way? To turn a Word or Google Doc into clean Markdown, use word2md.com. Same maker, same promise: it all happens in your browser. [Convert Word to Markdown](https://word2md.com/) ## Use it from code or an agent Agents and scripts can run the same converter on their own machine. Nothing is uploaded either way. Full reference: https://md2word.app/developers.md - **Claude Desktop (one click):** download [markdown-to-word.mcpb](https://github.com/benbalter/markdown-to-word-js/releases/latest/download/markdown-to-word.mcpb) and double-click it. Claude Desktop installs the MCP server below; no Node or terminal needed, since Claude Desktop includes Node. - **MCP server (local):** `claude mcp add markdown-to-word -- npx -y markdown-to-word mcp`, or in any MCP client the command `npx` with args `["-y", "markdown-to-word", "mcp"]`. Its tool `convert_markdown_to_word` takes `markdown` or a .md `path`, writes the .docx to `output_path`, and never fetches remote images. - **Command line:** `npx markdown-to-word report.md` writes report.docx next to it. - **Node library:** `convertMarkdownToWord(markdown)` from the [`markdown-to-word`](https://www.npmjs.com/package/markdown-to-word) package returns the .docx as a `Blob`. - **WebMCP:** in a browser with WebMCP, the converter page registers `convert_markdown_to_docx`, which returns the .docx as base64. ## Frequently asked questions ### How do I convert Markdown to Word? Paste your Markdown and click Convert to Word, or drop a .md file onto the page (or choose one) to convert it right away. Download the .docx, or copy the formatted text and paste it into Word. ### Is Markdown to Word free? Yes. It is free and open source, with no sign-up and no limit on how many documents you convert. ### Are my documents uploaded to a server? No. Conversion happens entirely in your browser using JavaScript. Your Markdown and the Word document never leave your device and are never uploaded, stored, or logged. ### How do I turn a ChatGPT or Claude response into a Word document? AI chat apps answer in Markdown. Use the response's copy button, paste it here, and convert. Headings, lists, tables, and code come through as real Word formatting instead of stray asterisks and pound signs. ### Which Markdown is supported? GitHub Flavored Markdown: headings, bold, italic, strikethrough, bulleted and numbered lists, task lists, tables, links, inline code, fenced code blocks, block quotes, and horizontal rules. The first heading becomes the document's title and file name. ### Can I paste the result into Google Docs? Yes. Click Copy formatted text and paste into Google Docs or Word, and the formatting comes with it. You can also download the .docx and open it in Google Docs. ### Can it format a Chinese official document (公文)? Yes. Choose the Chinese official document (公文) style before converting. It follows GB/T 9704-2012: body text in FangSong, headings in FZXiaoBiaoSong, SimHei, and KaiTi at the customary sizes, with Times New Roman for Latin text, on A4 paper with the standard margins, 22 lines of 28 characters per page, a centered title, and paragraphs indented two characters. Those fonts need to be installed wherever the document is opened. ### How is this different from Pandoc? Pandoc is a powerful command-line converter, but it has to be installed and configured first. Markdown to Word runs instantly in your browser with nothing to install. ## About The converter turns Markdown into HTML with [marked](https://marked.js.org/), then builds the .docx with [html-to-docx](https://github.com/TurboDocx/html-to-docx), all in JavaScript on the visitor's device. It succeeds the [markdown_to_word](https://github.com/benbalter/markdown_to_word) Ruby gem and web demo, first published in 2015. [Source code](https://github.com/benbalter/markdown-to-word-js) · by [Ben Balter](https://ben.balter.com) --- # How to turn a ChatGPT or Claude reply into a Word document AI chat apps write their answers in Markdown. That's why pasting a reply straight into Word often leaves stray `**asterisks**`, `#` signs, and pipe characters where the tables should be. Markdown to Word turns that Markdown into real Word formatting. ## Step by step 1. In ChatGPT, Claude, or another chat app, click the reply's **copy** button. In most chat apps, it copies the Markdown, formatting marks and all. 2. Open [md2word.app](/) and paste the reply into the box. 3. Click **Convert to Word**, then download the `.docx`. Or click **Copy formatted text** and paste straight into Word or Google Docs. The reply is converted in your browser. It isn't uploaded to md2word.app or anywhere else. ## What comes through - **Headings** become Word's Heading 1–6 styles, so the navigation pane and a table of contents work. The first heading becomes the document's title and file name. - **Bold, italic, and strikethrough** become real character formatting. - **Bulleted, numbered, and nested lists** become Word lists, and task lists (`- [ ]`) become ☐ and ☒ checkboxes. - **Tables** become bordered Word tables with a header row that repeats on every page. - **Code** is set in a monospace font, and code blocks keep their line breaks and indentation. - **Links** stay clickable. ## Things to know - **Math stays as text.** If a reply has equations like `$x^2$`, they come out as that literal text, not as Word equations. - **Footnotes** become a numbered list of notes at the end of the document, not Word footnotes at the bottom of each page. - **Images** are embedded when the browser is allowed to download them (most image hosts allow this). Otherwise they appear as their description, linked to the image. - **Copying the whole conversation** usually brings along names, timestamps, or buttons. Copy one reply at a time with its copy button for the cleanest result. ## Styling for Chinese official documents Paste mostly Chinese text and a **Style** menu appears. Choose **Chinese official document (公文)** before converting to apply the fonts, sizes, and page layout of GB/T 9704-2012. ## Many replies at once If you save replies as `.md` files, the [command-line tool](/developers/) converts them on your machine: ```console npm install -g markdown-to-word for f in replies/*.md; do md2w "$f"; done ``` Each `reply.md` becomes `reply.docx` next to it, replacing any `.docx` already there with the same name. --- # How to convert a Markdown table to a Word table Pasting a Markdown table into Word gives you rows of pipes and dashes. Markdown to Word turns it into a real Word table you can resize, restyle, and sort. ## Step by step 1. Copy your Markdown, table and all. It can be a whole document or just the table. 2. Paste it into [md2word.app](/) and click **Convert to Word**. 3. Download the `.docx`, or click **Copy formatted text** and paste into an open Word or Google Docs document. Conversion happens in your browser, and nothing is uploaded. ## What a table needs Markdown to Word reads GitHub Flavored Markdown tables (the table syntax GitHub, ChatGPT, and most editors use): a header row, a separator row of dashes, and then the data rows, with cells divided by pipes. ```markdown | Plan | Price | Seats | | ---- | ----- | ----- | | Free | $0 | 1 | | Team | $8 | 10 | ``` The outer pipes are optional, and the columns don't need to line up. ## What you get in Word - **A bordered table** with thin gray grid lines, like GitHub draws. - **A header row that repeats** at the top of every page when a long table spans several pages. - **Formatting inside cells**: bold, italic, strikethrough, code, and links all carry over. - **Column alignment**: colons in the separator row (`:---:`, `---:`) center or right-align the column. - **Everything else in the document** converts too: headings, lists, code blocks, and more. ## Things to know - **No merged cells.** Markdown tables don't have them, so neither will the Word table. Merge cells in Word afterward if you need to. - **A pipe inside a cell** must be written as `\|`, or Markdown reads it as a new column. ## Going the other way To turn a Word table back into Markdown, use [Word to Markdown](https://word2md.com/), the sibling converter by the same maker. --- # Markdown to Word for developers and agents The converter behind [md2word.app](/) is free and open source, published to npm as [`markdown-to-word`](https://www.npmjs.com/package/markdown-to-word). Every way of running it, below, converts on your own machine; the converter uploads nothing. With MCP or WebMCP, the agent sees the Markdown it sends and the file it gets back, as with any file you share with it. ## Claude Desktop (one click) [Download `markdown-to-word.mcpb`](https://github.com/benbalter/markdown-to-word-js/releases/latest/download/markdown-to-word.mcpb) and double-click it. Claude Desktop installs the [MCP server](#mcp-server-for-ai-agents) as an extension, so Claude can turn Markdown into Word documents on your computer. You don't need Node or a terminal: Claude Desktop includes Node. To install it another way, drag the file into Claude Desktop, or open **Settings > Extensions > Advanced settings > Install Extension**. ## Command line ```console npx markdown-to-word report.md npx markdown-to-word report.md -o out/report.docx cat reply.md | npx markdown-to-word -o reply.docx ``` A file converts to a `.docx` next to it with the same name, replacing any file already there. Reading from stdin needs `-o`, and `-o -` writes the `.docx` to stdout. `--font-preset chinese-official` applies the Chinese official document (公文) style. Install it globally (`npm install -g markdown-to-word`) to get the shorter `md2w` command. It needs Node 22.12 or later. See the [full CLI reference](https://github.com/benbalter/markdown-to-word-js#command-line). ## Node library ```js import { writeFile } from 'node:fs/promises'; import { convertMarkdownToWord } from 'markdown-to-word'; const blob = await convertMarkdownToWord('# Hello\n\nFrom **Markdown**.'); await writeFile('hello.docx', Buffer.from(await blob.arrayBuffer())); ``` It returns the `.docx` as a `Blob`. For the 公文 style, import `FONT_PRESETS` too and pass `{ fontPreset: FONT_PRESETS['chinese-official'] }`. In the library, remote images are downloaded so they can be embedded. See the [API reference](https://github.com/benbalter/markdown-to-word-js#use-it-from-code). ## MCP server for AI agents `npx -y markdown-to-word mcp` runs a local [Model Context Protocol](https://modelcontextprotocol.io) server on stdio. Add it to Claude Code: ```console claude mcp add markdown-to-word -- npx -y markdown-to-word mcp ``` Or to any MCP client: ```json { "mcpServers": { "markdown-to-word": { "command": "npx", "args": ["-y", "markdown-to-word", "mcp"] } } } ``` Its tool, `convert_markdown_to_word`, takes the Markdown as a string or the path of a `.md` file, writes the `.docx` to `output_path`, and returns its path and size. Because an agent may be acting on instructions it read somewhere, the tool is deliberately limited: - It reads only Markdown and text files (`.md`, `.markdown`, `.mdown`, `.txt`) and writes only `.docx` files. - It never replaces an existing file unless you pass `overwrite: true`, and never writes through a symlink. - It makes no network connections, so remote images stay as links. To embed one, have the agent pass it as a `data:` URI. See the [MCP reference](https://github.com/benbalter/markdown-to-word-js#mcp-server). ## WebMCP in the browser In a browser with [WebMCP](https://webmachinelearning.github.io/webmcp/), md2word.app registers a `convert_markdown_to_docx` tool for agents working in the tab. It takes Markdown, shows the result on the page, and returns the `.docx` as base64. As with pasting, the conversion runs in the tab and nothing is uploaded. ## Related MCP server [Open and Async MCP](https://github.com/open-and-async/mcp), from the same author, gives an agent async-first writing tools: draft a decision doc, swap a planned meeting for an async alternative, or score a status update. If your team drafts in Markdown and still owes some readers a Word file, this converter covers that step. The book behind it is [_Open and Async_](https://open-and-async.com/?utm_source=md2word&utm_medium=guide&utm_campaign=agents). ```console claude mcp add open-async -- npx -y @open-and-async/mcp ``` ## For crawlers and LLMs - [`/llms.txt`](/llms.txt) indexes the site, and [`/llms-full.txt`](/llms-full.txt) has all of it in one file. - Every English page has a Markdown version: add `.md` (for example [`/developers.md`](/developers.md)), or request the page with `Accept: text/markdown`. ## Source The code is on [GitHub](https://github.com/benbalter/markdown-to-word-js) under the MIT license. --- # Your privacy ## Information collected _TL;DR:_ This application is entirely client-side. Your Markdown and the Word document made from it never leave your computer and are never sent to any server. ### Information you provide When you choose, drop, or paste Markdown, it is converted to a Word document entirely within your browser using JavaScript. The contents are never transmitted to this site or any third party. All conversion happens locally on your device. If your Markdown links to images on other websites (for example `![logo](https://example.com/logo.png)`), your browser loads those images from the sites you linked, to show them in the preview and to embed them in the Word document, the same as any web page with images. Nothing else about your document is sent to them. ### Information stored on your device If you choose a document style (such as the Chinese official document preset), your browser remembers that choice in its local storage so you don't have to pick it again. It stays on your device and is never sent anywhere. ### Information collected automatically - **On md2word.app:** This site uses privacy-centric [Cloudflare Web Analytics](https://www.cloudflare.com/web-analytics/) to collect anonymous usage statistics. Cloudflare Analytics is privacy-first and does not track individual users or use cookies. - **On md2word.app:** When a conversion finishes, the site records a single anonymous count — whether it succeeded, the page's language, and how the conversion started (a dropped or chosen file, Markdown pasted or typed into the box, or an AI agent using the page's WebMCP tool), and, if it failed, which kind of error it was (for example, the converter couldn't load) — so we can answer one simple question: _is anyone still using this, and is it worth continuing to maintain and improve?_ This is **not** used to track or profile you. It contains **no document content, no filename, no file size, and nothing that identifies you or your device** — only that a conversion happened. Only conversions the site attempts are counted, so a file it turns away before converting (such as a Word document) isn't. Your Markdown and the Word document still never leave your browser. - **When self-hosted:** No analytics or tracking of any kind are included when you run the application locally or self-host it (the conversion count is sent only on md2word.app). ### How information is used - Your Markdown is converted to a Word document entirely on your device and never leaves your computer. - Anonymous usage statistics (on md2word.app) help understand general site usage patterns without identifying individual users. ### How information is shared Your documents and personal information are never shared because they never leave your device. Only anonymous, aggregated usage statistics are collected on md2word.app. ### A note on security This application runs entirely in your browser for maximum privacy and security. If you'd like to understand exactly what's happening, you can [view the complete source code](https://github.com/benbalter/markdown-to-word-js), or [run it locally](https://github.com/benbalter/markdown-to-word-js#development) without any analytics. --- # Terms of Use _TL;DR:_ This service is provided for your convenience, without any warranty of any kind. In an ideal world, if you use common sense, it will convert your document securely and privately, and this site will try its best, but make no guarantees whatsoever. Like any other website, your use of this service is subject to these terms, meaning if you use the service, you agree to be bound by these terms. That also means, that if you _do not_ agree with all of the terms here, you may not use the service. Assuming, "You" are the person providing a document to be converted (your "Content"), and "the Service" is the website you are currently on to convert your Content, specifically: - Don't use this Service for anything illegal. Don't try to hack or overburden the Service. Don't use it to harm others. - You may not use this Service if you are under 13 years old. Explain to your parents what Markdown is and have them use the Service on your behalf. - The Content you provide to be converted is your Content and you are responsible for it and any harm that it may cause to yourself or others. - The Service doesn't claim any ownership in the original Content or the Word document it is converted to. You, however, do claim that you have a right to possess and convert the Content. If you don't, don't use this service to convert it. If Content you convert infringes on the rights of others, that's on you. - The Service does not review your Content nor the Content of others, nor does it endorse any Content uploaded or converted. You're responsible for ensuring the Content or converted Content doesn't harm your computer (or anyone else's). - You use this Service at your own risk and it might break or cease to exist at any time. - If you'd like to know how your information is used and stored, read [more about your privacy](/privacy/). **This Service is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, or non-infringement. In no event shall the owners, maintainers, or copyright holders be liable for any claim, damages, or other liability, whether in action of tort, contract, or otherwise, arising from, out of, or in connection with the service or its use.**