mdgate converters

Convert files to Markdown in your browser.

Convert PDF, Word, Excel, PowerPoint, Apple iWork, HWP, email, ebooks, and dozens of other formats to GitHub-Flavored Markdown.

Your files stay on your device. No upload. No account.

Starting local converter

Try a sample:

More than .pdf and .docx

Package Extensions
@mdgate/docx docxdocmdotxdotm
@mdgate/doc docdot
@mdgate/rtf rtf
@mdgate/pptx pptxpptmppsxppsmpotxpotm
@mdgate/ppt pptppspot
@mdgate/xlsx xlsxxlsmxlsbxlsxltxxltmxlt
@mdgate/odf odtodsodpodgottotsotpotgfodtfodsfodpfodgsxwsxcsxisxdstwstcstistd
@mdgate/pages pages
@mdgate/numbers numbers
@mdgate/keynote key
@mdgate/wps wpswptetettdpsdpt
@mdgate/hwp hwphwpxhwthwtx
@mdgate/pdf pdf
@mdgate/html htmlxhtmlmhtmlmht
@mdgate/email emlmsgmboxemlx
@mdgate/ipynb ipynb
@mdgate/epub epubibooks
@mdgate/fb2 fb2fb2.zip
@mdgate/mobi mobiazwazw3prc
@mdgate/latex texlatexltx
@mdgate/visio vsdvsdxvssvstvssxvstx
@mdgate/onenote oneonetoc2onepkg
@mdgate/csv csvtsvtab
@mdgate/data jsonjsonlxmlyaml
@mdgate/text txtmdmdxjsjsxtstsxpyrbgorsjavaktchcccppcsswiftshbashzshsqlcssscsslessgraphql
@mdgate/subtitle srtvttassssalrcsubsbvttmljssjacosub
@mdgate/zip zipzipxjar
@mdgate/image svgjpegpngwebpgiftiffheicbmp
@mdgate/audio mp3wavm4aaacoggflacweba
@mdgate/video mp4m4vmovwebmmkvmk3davi

Dashed badges need a callback (vision for raster images, transcription for audio, video understanding for video) and are not registered by all(). SVG converts locally.

Use the same converter in your app.

$ npm install @mdgate/converters

// Everything
import { toMarkdown } from '@mdgate/converters';

const markdown = await toMarkdown(bytes, {
  path: filename,
});

// One format
import { toMarkdown } from '@mdgate/pdf';

const markdown = await toMarkdown(bytes);

// Your own converter
import { create } from '@mdgate/core';
import { pdf } from '@mdgate/pdf';

function myFormat() {
  return {
    id: 'my-format',
    sniff(bytes, hint) {
      if (looksLikeMine(bytes)) return 2;
      if (hint?.path?.endsWith('.mine')) return 1;
      return 0;
    },
    convert(bytes) {
      return { markdown: parseMine(bytes) };
    },
  };
}

const toMarkdown = create([myFormat(), pdf()]);
const markdown = await toMarkdown(bytes);

Pure TypeScript, Node.js, Cloudflare Workers, Edge, Browser, No Python, No native addons, No WASM, Zero third-party runtime dependencies

Give your agent files it can actually read.

Turn Word, spreadsheets, presentations, email, PDFs, and other real-world files into Markdown your agent can grep, search, chunk, index, cite, and reason over.

    • .pdf
    • .docx
    • .xlsx
    • .pptx
    • .hwp
    • .pages
    • .msg
  1. mdgate/converters
  2. Markdown
    • grep
    • search
    • chunk
    • index
    • cite

Why this converter

Runs where your JavaScript runs

Node.js, Cloudflare Workers, Edge runtimes, and browsers. No second runtime required.

Files stay local

Deterministic formats can be converted without sending the document to an external parsing service.

Detects the file, not just the extension

PDF signatures, Office containers, OLE streams, package metadata, and other format signals are detected from the bytes.

One Markdown output

Documents from different ecosystems converge on a consistent GitHub-Flavored Markdown representation.

FAQ

Are files uploaded to mdgate?

No. The converter on this page runs in a Web Worker and locally supported files stay in your browser.

What file formats can it convert?

PDF, Word, Excel, PowerPoint, OpenDocument, Apple iWork, HWP, WPS, email, OneNote, Visio, ebooks, archives, data files, and more.

Can I use it in Cloudflare Workers?

Yes. The converters are written in TypeScript and run in Cloudflare Workers without Python, native addons, or WASM.

Can I install only one format?

Yes. For example, use @mdgate/pdf, @mdgate/docx, or @mdgate/hwp.

What about scanned PDFs, images, audio, and video?

Deterministic document content is parsed locally. Media that requires model understanding can be connected to a model callback supplied by your application.