Free tool

Markdown Converter

Markdown editor with live preview. Convert to Word (.docx) or import a .docx to Markdown. No sign-up, no server.

Markdown (input)
Preview
Preview will appear here…

Need to format JSON or count words in your document?

How to use the Markdown converter?

  1. 1

    Write or paste your Markdown

    Type directly in the left panel or paste any Markdown-formatted text. You can also click Sample to load a demo document with all supported elements: headings, lists, tables, code and more. If you have a .md or .docx file on your computer, drag it directly onto the editor.

  2. 2

    See the result in real time

    The right panel shows the rendered Markdown preview as you type, without needing to press any button. Switch to HTML mode to see the generated source code, ready to copy into any website or CMS. Document statistics (words, lines, headings, tables) update automatically.

  3. 3

    Import a Word file (.docx)

    Click the Import .docx / .md button to open an existing Word file. The converter extracts the text and structure of the document — headings, paragraphs, lists, bold and italic — and transforms it into clean Markdown in the editing panel. This is the reverse flow: DOCX → MD. The quality of the result depends on the Word file using proper paragraph styles (Heading 1, Heading 2, etc.) instead of manual formatting.

  4. 4

    Download as .docx or .md

    When the document is ready, click .docx to download it as a Word file compatible with Microsoft Word, LibreOffice and Google Docs. Click .md to save the Markdown as a text file. The generated .docx includes hierarchical heading styles, numbered bullet lists, code blocks with grey background, bordered quotes and tables with highlighted headers.

Converter features

Real-time preview

Markdown is rendered instantly as you type. The conversion engine is pure JavaScript — no external libraries — implemented with regular expressions and DOM node processing. Supports H1-H6 headings, paragraphs, bold, italic, strikethrough, ordered and unordered lists with nesting, tables, code blocks, inline code, quotes, horizontal rules and images.

📄 Word (.docx) export without libraries

The .docx is generated entirely in the browser by building a ZIP file with Open XML from scratch, without npm install. The result includes custom paragraph styles for each heading level (with sizes and colours), lists with correct numbering, code blocks with monospaced font and grey background, tables with bold headers and indented quotes. Compatible with Word, LibreOffice and Google Docs.

🔄 DOCX → Markdown import

Open a .docx file and the converter extracts the internal Open XML, parses the paragraph styles (Heading1, Heading2, List Bullet, etc.) and generates equivalent Markdown. Bold and italic formatting marks are detected in individual runs. Ideal for migrating Word documents to Markdown-based systems: GitHub, Notion, Hugo, Jekyll, Obsidian.

📋 HTML mode — copy directly

Switch to HTML mode to see the source code generated from the Markdown. It is the same HTML used in the preview, with correct semantic tags: <h1>-<h6>, <ul>, <ol>, <blockquote>, <pre><code>, <table>. Copy that HTML and paste it directly into your CMS, HTML email or any web editor.

📊 Document stats panel

A panel with document metrics appears automatically below the editor: number of words, total characters, lines, detected headings, links, images, code blocks and tables. Statistics update in real time as you edit.

🔒 Total privacy — 100% local

All processing — rendering, conversion to .docx, importing .docx — happens entirely in your browser. No text, document or data is transmitted to external servers. You can use this tool with confidential documents, contracts, internal reports or any sensitive content.

Frequently asked questions

Is the generated .docx compatible with Microsoft Word?

Yes. The file follows the Office Open XML (OOXML) standard, the same format Word has used since 2007. It is compatible with Microsoft Word 2007 or later, LibreOffice 4+, Google Docs (import) and any application that supports .docx. Heading styles (Heading 1, Heading 2, etc.) are mapped correctly so the document has a real style structure, not just bold text.

Why is the DOCX → MD result not perfect?

The quality of the conversion depends directly on how the original Word file is structured. If it uses Word's native paragraph styles (Heading 1, Heading 2, Bullet List, etc.), the result is very clean. If formatting was applied manually — changing font size without assigning a style — the semantic information is lost and the converter can only extract plain text. For best results, always use paragraph styles in Word.

What Markdown elements does the converter support?

It supports the most common elements of the CommonMark specification: H1-H6 headings with #, paragraphs, bold with **, italic with *, bold+italic with ***, strikethrough with ~~, unordered lists with -, ordered lists with 1., nested lists, tables with |, code blocks with ``` and language, inline code with `, quotes with >, horizontal rules with ---, images with ![]() and links with []().

Can I import a .docx with images?

The converter extracts text and document structure. Images embedded in the .docx are not exported as separate files because they are binary-encoded inside the .docx ZIP. The alt text of images is preserved where available. For documents with many images, consider copying the text and images separately.

Is my document sent to any server?

No. The entire process of editing, rendering, conversion to .docx and importing .docx files happens completely in your browser using pure JavaScript and native browser APIs (File API, Blob, URL.createObjectURL). No data leaves your device at any time.

Embed the converter on your site

You can embed this Markdown converter in any web page with a simple iframe:

<iframe
  src="https://miguelacm.es/embed/markdown-converter"
  width="100%"
  height="700"
  frameborder="0"
  title="Markdown Converter"
></iframe>
View embed in new tab →