A fast, private, and client-side web application for converting clipboard content (HTML, RTF, and plain text) into clean, standard Markdown.
-
📐 LaTeX & Math Expressions Support
- Converts math formulas from clipboard HTML into standard Markdown syntax:
- Inline math:
$...$ - Block math:
$$...$$andmathcode blocks
- Inline math:
- Intelligently extracts TeX source from:
- KaTeX HTML (
<annotation encoding="application/x-tex">) - MathML (
<math>) and<annotation>tags - MathJax containers (
<mjx-container>) and script elements - Wikipedia math formula images (
altattribute containing TeX) - Custom HTML data attributes (
data-tex,data-formula,data-latex)
- KaTeX HTML (
- Built-in offline KaTeX rendering in the Preview tab with zero external network requests.
- Converts math formulas from clipboard HTML into standard Markdown syntax:
-
📋 Universal Multi-Source Clipboard Conversion
- Seamlessly handles rich text copied from:
- Web browsers (tables, nested lists, headings, blockquotes)
- Microsoft Word, Outlook, and Office RTF content (cleans up bullet artifacts and spacing)
- Microsoft Excel spreadsheets (converts to GFM Markdown tables with multiline cell support)
- VS Code and code editors (preserves indentation and strips redundant margins)
- Plain text output (such as GitHub Copilot CLI or terminal logs)
- Seamlessly handles rich text copied from:
-
📑 Dual-Format (MIME) Clipboard Copy
- Dedicated 📋 Copy button writes both
text/plain(raw Markdown) andtext/html(rendered HTML) to the system clipboard simultaneously. - Paste into Markdown/code editors to get raw Markdown, or paste directly into rich text editors (Notion, Google Docs, Word, Slack, Teams) with formatting preserved.
- Dedicated 📋 Copy button writes both
-
🔗 One-Click Shareable Links
- Use the 🔗 Share button to compress and encode your converted Markdown directly into the URL hash.
- Recipients can open the link to instantly read, preview, or copy the content without requiring any server database or account.
-
👀 Live Real-Time Preview
- Side-by-side or tabbed Edit and Preview modes with GitHub Flavored Markdown (GFM) tables, syntax rendering, and KaTeX mathematical equation support.
-
🌓 Theme Switcher
- Choose between System default, Light, and Dark modes.
- Saves your theme preference in local storage with automatic contrast adjustment.
-
🌍 Multi-Language Support (15 Languages)
- Fully translated interface available in:
- English, 繁體中文, 简体中文, 日本語, 한국어, Español, Français, Português, Русский, العربية (with native RTL support), Türkçe, Tiếng Việt, ภาษาไทย, Bahasa Indonesia, and हिन्दी.
- Fully translated interface available in:
-
🔒 Privacy & Security
- 100% Client-Side: All parsing, sanitization, and rendering execute entirely within your browser sandbox. No telemetry, no backend server, and no clipboard data is ever sent to the network.
- Strict HTML sanitization via
DOMParserblocking malicious scripts, unsafe URLs, and protocol injection.
- Copy formatted content from any webpage, document, or application (
Ctrl+Cor⌘+C). - Paste onto the Paste to Markdown window (
Ctrl+Vor⌘+V). - The content is instantly converted into Markdown:
- Click 📋 Copy to copy both Markdown and formatted HTML to your clipboard.
- Click 🔗 Share to generate a shareable URL containing the document.
- Keyboard Shortcuts:
Escape: Clear workspace and reset.Alt+1/Option+1: Switch to Edit tab.Alt+2/Option+2: Switch to Preview tab.
Paste-to-Markdown/
├── index.html # Main entry point, layout, and styling
├── Makefile # Local server management and syntax check tasks
├── assets/
│ ├── clipboard2markdown.js # Core app logic, clipboard handling, and KaTeX extensions
│ ├── to-markdown.js # Custom HTML-to-Markdown conversion utilities
│ ├── bootstrap.css # Base UI stylesheet
│ ├── workspace-bg-light.png # Light theme background asset
│ └── workspace-bg-dark.png # Dark theme background asset
├── vendor/
│ ├── turndown/ # Turndown HTML-to-Markdown converter
│ ├── turndown-plugin-gfm/ # GFM table and task list plugin
│ ├── marked/ # Markdown parser and renderer
│ └── katex/ # Local offline KaTeX library, fonts, and stylesheets
└── i18n/ # Localization dictionaries (15 languages)
No build tools, npm packages, or bundlers are required. You can serve the project using any static web server:
# Start local server and automatically open the browser
make
# Or start the server in the background
make serve-bg
# Check background server status
make status
# Stop background server
make stop
# Verify JavaScript syntax
make check- Based on to-markdown by Dom Christie.
- Markdown conversion powered by Turndown and Marked.
- Math rendering powered by KaTeX.
- Designed, developed, and maintained by Will 保哥的技術交流中心.
This project is open source and available under the MIT License.
