Converts GitHub Flavored Markdown (GFM) to rich HTML and copies it to the system clipboard for pasting into Word, Google Docs, Pages, Teams, etc.
cat file.md | md2cbThen, paste the copied clipboard content to the target app.
Add --edit/-e flag to edit the content in $EDITOR before converting. -e
would open an empty markdown file if run without any input (file or stdin).
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/letientai299/md2cb/main/scripts/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/letientai299/md2cb/main/scripts/install.ps1 | iexInstalls to /usr/local/bin (Unix) or %USERPROFILE%\bin (Windows) by default.
Use -d <path> to specify a custom directory.
Rendered from test/demo.md.
| Microsoft Teams | Google Docs | Froala Editor for reference |
![]() |
![]() |
![]() |
See mise tasks for list of common tasks. Use mise dev to start the 2 web
servers:
- http://localhost:9091/demo.md: Markdown preview rendered by markserv:
- http://localhost:9090: Froala editor for pasting the converted content
- https://mise.jdx.dev for manage dev toosl and tasks runner.
- Docker for running dev servers
Most of the code was written by Claude Code, with some code review from Copilot!
At work I need to use Teams. It supports a few makdown features, but the editing experience for long message isn't smooth. So, I often write in NVim and use the below shell script to convert them before paste to Teams.
pandoc --from gfm --to html |
textutil -convert rtf -stdin -stdout -format html |
pbcopy -PreferThe script work well for typical bullet list, but:
- Doesn't support image, mermaid.
- Mac only.
Hence, I build this.


