fmtmd

CLI tool written in Go. Convert Markdown to Slack-compatible HTML format for pasting into Slack, Google Docs, and other apps that recognize HTML clipboard format.

Installation

From Source

go install github.com/rynf1t/fmtmd@latest

Or build from source:

git clone https://github.com/rynf1t/fmtmd.git
cd fmtmd
go build -o fmtmd

Pre-built Binaries

Download pre-built binaries from GitHub Releases for macOS, Linux, and Windows.

Usage

# Read from stdin
echo "# Hello **world**" | fmtmd

# Read from file
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=false

Features

Platform Support

How It Works

  1. Reads Markdown from stdin, file, or clipboard
  2. Converts directly to HTML (preserving heading structure for Google Docs)
  3. Also generates Slack-formatted text as a fallback
  4. Copies HTML to clipboard using platform-specific methods
  5. When you paste into Slack or Google Docs, the HTML format is recognized and formatting is applied

Examples

# Convert a markdown file and paste into Slack
fmtmd meeting-notes.md

# Convert from clipboard and paste into Google Docs
fmtmd -c

Troubleshooting

See Also

Web version - Use the tool in your browser

View source code on GitHub