PasteMD: paste Markdown and AI chat replies into Word, WPS and Excel
一键将 Markdown 和网页 AI 对话(ChatGPT/DeepSeek等)完美粘贴到 Word、WPS 和 Excel 的效率工具 | One-click paste Markdown and AI responses (ChatGPT/DeepSeek) into Word, WPS, and Excel perfectly.
At a glance
- What is it?
- PasteMD is a Windows tray utility that reads Markdown or rich HTML from the clipboard, converts it with Pandoc, and drops the result at the cursor in Word, WPS or Excel. It removes the formula and table cleanup that normally follows a copy from ChatGPT or DeepSeek, at the cost of a Pandoc dependency and a Windows-shaped feature set.
- Who is it for?
- Adopt PasteMD if you write on Windows and regularly move Markdown or AI answers into Word, WPS or Excel, and you accept that Pandoc is part of the pipeline. Skip it if you work mainly on Linux, if you need a headless converter, or if you cannot install a bundled Pandoc.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 29 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The gap between an AI answer and a Word document
Copying an answer out of ChatGPT or DeepSeek and pasting it into Word usually produces something close to the original, but not the original. LaTeX formulas arrive as raw text, Markdown tables arrive as pipes and dashes, and heading levels collapse. Fixing that by hand is a few minutes per document, repeated many times a day for anyone writing a paper or a report.
PasteMD targets that specific loop. It is a tray-resident tool that watches the clipboard, converts what it finds with Pandoc, and inserts the result at the cursor of the foreground document. The README frames the motivation directly: formulas copied from AI sites come out garbled in Word, and Markdown tables do not paste into Excel. The tool is written for people who already work in Markdown or in an AI chat window and whose final destination is a Microsoft Office document. It is not a Markdown editor and not a general clipboard manager.
How PasteMD turns clipboard content into a DOCX insert
The pipeline is short and visible in the repository. The process runs from main.py with the application code under the pastemd/ package, reads the clipboard with pyperclip, and calls Pandoc to produce a DOCX. Rather than asking you to save a file and open it, it inserts into the running Word or WPS instance, detecting the foreground application through psutil. The global hotkey is registered with pynput, and the tray icon comes from pystray.
Two behaviours are worth separating. Plain Markdown or rich HTML from a web page goes through Pandoc into DOCX and is inserted into Word or WPS. A Markdown table is detected as such and routed to Excel instead, which is why the README describes Excel support as a distinct feature rather than a side effect. A third mode, application extensions, lets you bind a paste mode (HTML+Markdown, HTML, Markdown, LaTeX, or file) to an application or window title, so the same hotkey can behave differently in 语雀 or QQ.
Conversion is configurable per type: the release notes for this line mention Pandoc filters per conversion type, plus automatic repair of some LaTeX syntax and of single-dollar formula blocks. The requirements file also pulls in mathml2omml-as, which points at MathML to OMML conversion, the format Word uses for native equations. That is the part that decides whether a formula lands as an editable equation or as a block of LaTeX text.
Installing PasteMD and pasting your first AI answer
The README points at the Releases page for binaries. The portable single-file build is no longer offered and would require Pandoc to be installed and callable from the command line; the recommended option is PasteMD_pandoc-Setup.exe, described as an all-in-one installer that carries Pandoc with it.
After installing, the workflow is: place the cursor in Word, WPS or Excel, copy Markdown or a web page selection to the clipboard, and press the hotkey. The default is Ctrl+Shift+B.
Ctrl+Shift+BA notification in the corner reports success or failure. If the clipboard holds a Markdown table and Excel is open, the table goes to Excel; otherwise the content is converted to DOCX and inserted into Word or WPS.
On first run a config.json is written to the user data directory. On Windows that is %APPDATA%\PasteMD\config.json. The README shows the keys and their defaults, including the hotkey, the Pandoc path, and whether converted files are kept on disk.
{
"hotkey": "<ctrl>+<shift>+b",
"pandoc_path": "pandoc",
"reference_docx": null,
"save_dir": "%USERPROFILE%\\Documents\\pastemd",
"keep_file": false,
"notify": true,
"enable_excel": true,
"excel_keep_format": true,
"paste_delay_s": 0.3,
"no_app_action": "open"
}Two of those keys carry most of the practical weight. reference_docx lets you point at a DOCX whose styles Pandoc will use, which is how you make the output match an existing document template instead of Pandoc's defaults. no_app_action decides what happens when no target application is detected, and the README's example value is "open", meaning the converted file is opened rather than dropped. The README does not document a rollback path for a paste that lands in the wrong place, so keep a document you can undo in.
Where the compatibility table says it will disappoint you
The README publishes a compatibility matrix for nine AI sites across four scenarios, and it is more honest than most. ChatGPT's Markdown copy with formulas is marked as showing formulas as code: the math arrives as LaTeX text that you then have to re-enter through the Word equation editor. Kimi and 通义千问 lose formulas entirely when you copy rendered web content rather than using the site's copy button. 豆包 needs a browser clipboard-read permission enabled before web-content copying works at all.
The pattern behind those marks is that the tool can only convert what reaches the clipboard. If a site's copy button emits HTML with a rendered formula as an image or a MathML fragment the converter cannot map, no amount of Pandoc configuration recovers it. The README's own legend distinguishes three outcomes: correct display, formulas shown as code, and formulas lost.
The second limitation is platform. The repository ships build_macos.sh and build_dist_dmg.sh, and requirements.txt carries Darwin-only dependencies (pync) and Windows-only ones (pywin32, win10toast, win11toast), but the README's install instructions and the badge both describe Windows, Word and WPS. Word and WPS automation on macOS is not described in the README. If your team is on Linux, this is the wrong tool; the clipboard-to-DOCX step has no Linux path documented here.
PasteMD against the plain Pandoc command line
The obvious alternative is doing it yourself with Pandoc, which is what PasteMD calls underneath. The difference is where the work sits. With Pandoc alone you save the clipboard text to a file, run a conversion, then open or import the result into Word. PasteMD removes the file step and the target-application step: it reads the clipboard, converts in memory, and inserts at the cursor of the window you are already in.
That convenience is also the dependency. The portable build is gone precisely because it required a working Pandoc on PATH, and the current installer bundles it. If you want a scriptable, headless conversion that runs on a server or in CI, Pandoc is the right answer and PasteMD adds nothing. If you want a hotkey that behaves differently depending on whether the foreground window is Excel, a chat app or a note-taking tool, PasteMD's application extensions are the feature Pandoc has no equivalent for. The trade is a GUI process, a tray icon and a config file against a single command with flags you control.
Licence, upgrades and what maintenance looks like
PasteMD is AGPL-3.0. For an end user running the installer on a personal machine, that is a normal open source licence. For anyone embedding the converter in a product or exposing a modified version over a network, the AGPL's source-availability terms apply, so read LICENSE and THIRD_PARTY_NOTICES.md rather than assuming MIT-like freedom. The repository also vendors a fork of pystray and pulls mathml2omml-as from a Git URL, both of which are third-party code with their own terms.
The last push to the default branch was on 2026-09-02, and the most recent release listed is v0.1.7.5rc1 from 2026-08-08, preceded by v0.1.7.4 and v0.1.7.3. That is an actively moving release line. The upgrade cost is mostly the bundled Pandoc: because the installer carries its own copy, upgrading PasteMD may also move the Pandoc version underneath your conversions, and reference_docx templates that worked with one Pandoc release are worth re-checking after an upgrade. The README does not describe a migration or rollback procedure for config.json across versions.
Editorial conclusion
Adopt PasteMD if you write on Windows and regularly move Markdown or AI answers into Word, WPS or Excel, and you accept that Pandoc is part of the pipeline. Skip it if you work mainly on Linux, if you need a headless converter, or if you cannot install a bundled Pandoc. Before trusting it, verify the one combination that matters to you: the README's compatibility table marks ChatGPT Markdown with formulas as displaying formulas as code, so test that specific path first.
Frequently asked questions
How do I paste a Markdown into Word with PasteMD?
Copy the Markdown to the clipboard, put the cursor where the content should go in Word or WPS, and press the default hotkey Ctrl+Shift+B. PasteMD converts it with Pandoc and inserts the DOCX at the cursor, then shows a success or failure notification.
What does copy Markdown mean in PasteMD's context?
It refers to using the copy button on an AI reply, which usually puts Markdown on the clipboard, though the README notes some sites also attach HTML. PasteMD reads whatever format is on the clipboard and converts it, which is why the compatibility table separates copying Markdown from copying rendered web content.
Can you paste Markdown in Word?
Not natively, which is the problem PasteMD addresses. Word has no Markdown importer, so the README describes copying formulas from ChatGPT or DeepSeek and finding them garbled in Word. PasteMD converts the clipboard content to DOCX through Pandoc and inserts it into the open document.
How do I create a Markdown file for PasteMD?
The README does not cover authoring Markdown files. PasteMD works from the clipboard, so the source can be an AI site's copy button, a web page selection, or any text you copy. The README documents no file-based input path.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/richqaq-pastemd)