Convert Markdown to Slack-compatible HTML format for pasting into Slack, Google Docs, and other apps that recognize HTML clipboard format.
go install github.com/rynf1t/fmtmd@latestThis installs fmtmd to ~/go/bin/. To use it as fmtmd from anywhere:
# Create alias (add to ~/.zshrc or ~/.bashrc)
ln -sf ~/go/bin/fmtmd ~/go/bin/fmtmd
# Make sure ~/go/bin is in your PATH (usually already is)
export PATH="$HOME/go/bin:$PATH"Or build from source:
git clone https://github.com/rynf1t/fmtmd.git
cd fmtmd
go build -o fmtmdDownload pre-built binaries from GitHub Releases for macOS, Linux, and Windows.
The tool is available as both fmtmd and fmtmd (if you set up the alias). Use it from anywhere:
# Read from stdin - simplest usage
echo "# Hello **world**" | fmtmd
# Read from file
fmtmd input.md
# or
fmtmd input.md
# Read from clipboard
fmtmd -c
# Write to file instead of clipboard
fmtmd input.md -o output.html
# Output to stdout (don't copy to clipboard)
fmtmd input.md -clipboard=falseNote: By default, the tool copies formatted HTML to your clipboard. Just paste into Slack or Google Docs!
- Converts Markdown to HTML with proper heading tags (
<h1>,<h2>,<h3>) for Google Docs - Converts to Slack format for plain text fallback
- Copies HTML to clipboard in a format recognized by Slack and Google Docs
- Supports all common Markdown features:
- Headings
- Bold and italic text
- Lists (bulleted and numbered)
- Code blocks and inline code
- Links
- Blockquotes
- Strikethrough
- macOS: Full HTML clipboard support using AppleScript
- Linux: Plain text clipboard (HTML clipboard support coming soon)
- Windows: Plain text clipboard (HTML clipboard support coming soon)
- Reads Markdown from stdin, file, or clipboard
- Converts directly to HTML (preserving heading structure for Google Docs)
- Also generates Slack-formatted text as a fallback
- Copies HTML to clipboard using platform-specific methods
- When you paste into Slack or Google Docs, the HTML format is recognized and formatting is applied
# Convert a markdown file and paste into Slack
fmtmd meeting-notes.md
# Convert from clipboard and paste into Google Docs
fmtmd -c
# Pipe markdown from anywhere
cat notes.md | fmtmd- Formatting doesn't work when pasting: Make sure you're pasting into an app that recognizes HTML clipboard format (Slack, Google Docs, etc.)
- Clipboard errors on macOS: Ensure you've granted Terminal/iTerm accessibility permissions in System Preferences
- HTML clipboard not working: The tool will fall back to plain text. HTML clipboard support is currently only available on macOS.
- Web version - Use the tool in your browser
- All Tools - Browse all available tools