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.

✨ 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
| 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
- Right-click any supported file in the Explorer sidebar
- Click Convert to Markdown
- 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:
python -m markitdown <input> -o <output> ← Primary (reliable, env-aware)
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...
📝 License
MIT — see LICENSE for details.