mdgate

Any document in.
Markdown out.

Open-source TypeScript converters that turn Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF into GitHub-Flavored Markdown. This page runs them in your browser: files never leave your machine.

  • doc
  • docx
  • ppt
  • pptx
  • xls
  • xlsx
  • odt
  • ods
  • odp
  • rtf
  • epub
  • csv
  • pdf
  • npm @mdgate/converters
  • api mdgate
  • runtime Node · Edge · browser

No document at hand? Try a sample:

About

One model
Office formats parse into the same document model and render through the same Markdown serializer, so headings, nested lists, and merged table cells come out the same from a .doc as from yesterday’s .xlsx.
Detection
The format is read from the bytes, not the extension, so mislabeled files still convert. Pass hint.path only for formats without a signature, such as CSV.
Portable
The converters are TypeScript with no Node builtins. The same toMarkdown(bytes) call works in Node, Edge, and this page.
PDF
Text-based PDFs convert locally. Scanned or image-only pages need OCR and are reported as unsupported.
This page
The converter above is @mdgate/converters, running in a Web Worker. Drop a file into your own app the same way.

Install

Local
$ npm install @mdgate/converters
Hosted API
$ npm install mdgate
import { toMarkdown } from '@mdgate/converters';

const bytes = new Uint8Array(await file.arrayBuffer());
const markdown = await toMarkdown(bytes, { path: file.name });