A high-fidelity, standalone Markdown Viewer built with Python and pywebview. It leverages the native Windows Edge (WebView2) engine to provide a premium, GitHub-like reading experience for local Markdown files.
- Native Fidelity: Uses the Edge Chromium engine for perfect rendering of tables, task lists, and code blocks.
- Base64 Image Embedding: Automatically converts local images to Base64 data URIs to bypass browser security restrictions. Relative paths like
just work. - Modern UI:
- Clean landing page with a "Browse File" button.
- Drag-and-drop support for quick previews.
- Custom GitHub-mimicking CSS for a familiar feel.
- Standalone Executable: Packaged with PyInstaller into a single
.exewith a custom YouTube-themed icon. - CLI & File Association: Designed to work as a default "Open With" handler for
.mdfiles.
- Backend: Python 3.13
- Frontend Engine:
pywebview(using Edge WebView2/Chromium) - Converter:
markdownlibrary with extensions (fenced code, tables, nl2br). - Styling: Embedded GitHub-style CSS via a custom Python template.
The easiest way to use the viewer is the pre-built executable:
- Navigate to
dist/MDViewer.exe. - Double-click to launch the landing page.
- Or, right-click any
.mdfile -> Open with... -> ChooseMDViewer.exe.
You can launch the viewer directly with a file path:
.\dist\MDViewer.exe "C:\path\to\your\document.md"- Clone the repository.
- Create a virtual environment:
python -m venv .venv .\.venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt
python mdviewer.pyTo rebuild the standalone .exe with the custom icon:
pyinstaller --noconsole --onefile --icon "app_icon.ico" --name "MDViewer" mdviewer.pymdviewer.py: The core application logic and UI template.app_icon.ico: The YouTube-themed application icon.requirements.txt: Python dependencies..venv/: Local virtual environment (ignored by Git).dist/MDViewer.exe: The final distributable binary.
Apache License 2.0