Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>convert2markdownNew to Visual Studio Code? Get it now.
convert2markdown

convert2markdown

Md. Refayatul Islam

|
8 installs
| (2) | Free
Convert documents (PDF, Word, Excel, PowerPoint, HTML, and more) to Markdown using Microsoft's MarkItDown.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-markitdown

A Visual Studio Code extension that converts documents (PDF, Word, Excel, PowerPoint, HTML, and more) into Markdown using Microsoft's MarkItDown — similar to how vscode-pandoc works, but focused on converting to Markdown.

VS Code License Built with TypeScript


✨ Features

  • Right-click any file in the Explorer → Convert to Markdown
  • Command Palette → Ctrl+Shift+P → type Convert to Markdown
  • Keyboard shortcut → Ctrl+K M (Windows/Linux) / Cmd+K M (macOS)
  • Output .md file is saved beside the source file and opens side-by-side automatically
  • Auto-detects your Python installation — no manual PATH configuration needed
  • Friendly error messages with install instructions if markitdown is missing

📄 Supported Input Formats

Format Extension
PDF .pdf
Word .docx
PowerPoint .pptx
Excel .xlsx, .xls
HTML .html, .htm
CSV .csv
JSON .json
XML .xml
Audio (with transcription) .wav, .mp3
EPub .epub
ZIP .zip
… and more

🔧 Prerequisites

You must have Python and markitdown installed on your system:

python -m pip install "markitdown[all]"

Why python -m pip? This ensures you install into the correct Python environment — the same reason this extension uses python -m markitdown under the hood instead of relying on a bare markitdown command in your PATH.


🚀 Usage

Option 1 — Explorer context menu

  1. Right-click any supported file in the Explorer sidebar
  2. Click Convert to Markdown
  3. The .md file is created next to the source and opens in a new pane

Option 2 — Keyboard shortcut

With a supported file open in the editor, press:

  • Windows/Linux: Ctrl+K M
  • macOS: Cmd+K M

Option 3 — Command Palette

Press Ctrl+Shift+P (or Cmd+Shift+P) and type:

Convert to Markdown

⚙️ Extension Settings

Configure via File → Preferences → Settings → search markitdown.

Setting Default Description
markitdown.pythonPath "python" Path to your Python executable. Change if using a virtual environment (e.g. python3).
markitdown.cliPath "markitdown" Path to the markitdown CLI. Override if it's not in your system PATH.
markitdown.usePythonModule false If true, forces the bare markitdown CLI to be used instead of python -m markitdown.

Example: Using a virtual environment

Add to your workspace .vscode/settings.json:

{
  "markitdown.pythonPath": "C:/path/to/venv/Scripts/python.exe"
}

🛠️ How It Works

The extension runs python -m markitdown under the hood using Node.js's child_process. This mirrors the recommended python -m pip install pattern — by going through Python directly, it always resolves to the correct environment.

Command execution order:

  1. python -m markitdown <input> -o <output> ← Primary (reliable, env-aware)
  2. markitdown <input> -o <output> ← Fallback (bare CLI, if on PATH)

👨‍💻 Development

Requirements

  • Node.js ≥ 16
  • VS Code ≥ 1.75.0

Setup

git clone https://github.com/Refayatul/vscode-markitdown.git
cd vscode-markitdown
npm install
npm run compile

Press F5 in VS Code to launch the Extension Development Host.

Package for distribution

npm run package
# Outputs: vscode-markitdown-0.1.0.vsix

Install the .vsix manually via: Extensions → ⋯ menu → Install from VSIX...


🔗 Related Projects

  • microsoft/markitdown — the underlying Python conversion engine
  • chrischinchilla/vscode-pandoc — inspiration for this extension's UX

📝 License

MIT — see LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft