Help › Converting documents to Markdown
Converting documents to Markdown
Markdown is the ideal format for writing and maintaining long-form manuscripts, technical books, and documentation. It separates content from presentation, integrates smoothly with version control (Git), works natively with modern knowledge bases like Obsidian, and compiles cleanly into publication-grade formats.
If you have an existing manuscript in Microsoft Word (.docx), a published e-book in EPUB format, a research paper in PDF, or articles in HTML, you can convert them directly into clean, standardized Markdown using our free web tools.
1. Word (.docx) to Markdown
Microsoft Word is the standard drafting tool for editors and traditional publishers. When moving a manuscript into MarkdownBooks, you do not need to retype or manually reformat your chapters.
What is converted
- Headings: Word heading styles (Heading 1 through Heading 6) are converted into Markdown
#,##,###headings. - Text styles: Bold, italic, strikethrough, subscript, and superscript are translated into standard syntax.
- Lists: Bulleted lists and numbered sequences retain their indentation and numbering.
- Tables: Native Word tables are converted into GitHub Flavored Markdown (GFM) pipe tables with column alignment preserved.
- Footnotes & links: Hyperlinks and footnotes are mapped to standard Markdown footnote markers (
[^1]). - Embedded images: High-resolution pictures and diagrams inside the Word document are extracted and saved into a companion
media/folder.
How to convert
- Open the Word to Markdown tool.
- Choose or drag and drop your
.docxfile (up to 20 MB). - Click Convert to Markdown.
- Preview the resulting Markdown in your browser, check word and line counts, and click Copy Markdown or Download .md. If your document contains images, click Download .zip to get the markdown file and images folder packaged together.
2. PDF to Markdown
PDF documents are built for precise print layout rather than structured text editing. Extracting text from a PDF often produces fragmented sentences, lost headings, and broken paragraphs.
The MarkdownBooks PDF converter uses an intelligent layout analyzer to reconstruct clean prose:
What the converter handles
- Heading detection: Font sizes, weights, and layout positions are evaluated to classify chapter titles, section headers, and subheadings into
#and##levels. - Paragraph re-flow: Hard line wraps within a paragraph are joined into smooth, continuous sentences while preserving genuine paragraph breaks.
- Bullet lists: Extracted bullet glyphs (
•,–,*) are cleaned and formatted as standard Markdown list items. - Page break markers: Subtle HTML comments (
<!-- Page 1 of 15 -->) are placed between pages so you can easily reference original page numbers and citations.
Tips for PDF conversion
- The converter processes digital, searchable PDFs with selectable text. If you have a scanned physical book or document without text, run OCR (Optical Character Recognition) before converting.
- Review the generated preview in the PDF to Markdown tool to confirm chapter title hierarchy before assembling your book.
3. EPUB to Markdown
EPUB is the open industry standard for reflowable e-books on Apple Books, Kobo, and Google Play. If you want to revise an earlier published edition or import an open-access e-book into Markdown, the EPUB converter extracts all chapters and illustrations.
What the converter extracts
- Chapter breakdown: EPUB spine files and XHTML sections are translated into a coherent Markdown document with structured headings.
- Illustrations and covers: Embedded JPEG, PNG, and SVG graphics, including cover artwork, diagrams, and chapter illustrations, are extracted.
- Clean typography: Proprietary CSS and vendor-specific tags (such as Kindle or Adobe reader wrappers) are stripped, leaving pristine Markdown.
How to convert
- Open the EPUB to Markdown tool.
- Upload your DRM-free
.epubfile (up to 20 MB). - Click Convert to Markdown.
- Download the
.mdfile or the complete.ziparchive containing your manuscript and all extracted illustrations.
4. HTML to Markdown
When copying articles, blog posts, or web documentation, the source markup is HTML loaded with extraneous tags, tracking scripts, and inline styling.
Sanitization and conversion
- Strict allowlist: Only semantic tags (
h1-h6,p,ul,ol,li,blockquote,code,pre,table,a,img) are translated. - Noise removal:
<script>,<style>,<iframe>,<form>, tracking pixels, and inline CSS styles are eliminated. - Table conversion: HTML
<table>,<tr>,<th>, and<td>elements become clean Markdown pipe tables.
How to use
Visit the HTML to Markdown tool. You can upload an .html or .htm file, or paste raw HTML markup directly into the editor for instant conversion.
5. Medium stories and posts
Medium is a major platform for technical essays, software tutorials, and book previews. However, the Medium editor does not accept raw Markdown files directly.
Markdown to Medium Post
- Open the Markdown to Medium Post tool.
- Choose your
.mdfile or paste your Markdown draft. - Click Convert for Medium to generate semantic HTML structured for Medium's editor.
- Click View in Browser to open the rendered article in a new tab.
- Press
Ctrl+A(orCmd+A) to select all, copy (Ctrl+C/Cmd+C), and paste (Ctrl+V/Cmd+V) directly into the Medium story editor. - All titles, headers, blockquotes, code blocks, bullet points, and links transfer seamlessly without manual reformatting!
Medium Post to Markdown
If you already published articles on Medium and want to migrate them to your own personal blog, Astro/Hugo site, or a Markdown book:
- Open the Medium Post to Markdown tool.
- Copy the HTML from your Medium post (inspect element or view source) and paste it into the editor.
- Click Convert to Markdown. Medium's internal classes and tracking elements are stripped, leaving pristine GitHub Flavored Markdown.
- Click Download .md to save the formatted Markdown file directly to your disk.
Next steps: Turning your Markdown into a book
Once your document is converted into clean Markdown:
- Verify manuscript syntax: Run your file through the browser-based manuscript checker to catch unclosed formatting, broken links, or table issues.
- Review manuscript standards: Check the manuscript standards guide to see formatting requirements for front matter and chapter openers.
- Generate your book: Head to the MarkdownBooks home page, upload your
.mdfile, pick your publication formats (Print-ready PDF, EPUB, Word, or HTML), customize your cover, and compile your finished book in seconds.
Something unclear? Tell us and we will improve this guide.