Markdown to WeChat Official Account Formatter
将 Markdown 一键转换为微信公众号排版,复制即用
💡 Left: Markdown editor with dark theme — Right: Real-time WeChat-style preview
- ⚡ Real-time Preview — Write Markdown on the left, see WeChat-formatted output instantly on the right
- 🎨 4 Built-in Themes — Minimal / Tech / Literary / Business — switch with one click
- 🖍️ Syntax Highlighting — Powered by highlight.js, supports all major programming languages
- 📋 One-click Rich Text Copy — Auto-inlines CSS styles, paste directly into WeChat editor without losing formatting
- 📐 Draggable Split Pane — Resize editor and preview panels by dragging the divider
- 📝 Full Markdown Support — Headings, lists, tables, blockquotes, images, links, strikethrough, and more
- 🔒 100% Client-side — Pure frontend, zero server uploads, your content stays on your device
- 🌐 Zero Install — No build tools, no dependencies to install — just open and use
👉 https://lifa-su.github.io/md2wechat
git clone https://github.com/Lifa-su/md2wechat.git
cd md2wechat
# Simply open in browser
open index.html # macOS
# or
xdg-open index.html # Linux
# or
start index.html # Windowscd md2wechat
python3 -m http.server 8080
# Visit http://localhost:8080- ✍️ Write or paste Markdown in the left editor
- 👀 Preview auto-renders WeChat-formatted output on the right
- 🎨 Pick a theme from the dropdown
- 📋 Click "📋 复制富文本" (Copy Rich Text) button
- 📱 Open WeChat Official Account editor →
Ctrl+V/Cmd+Vto paste
| Theme | Style | Best For |
|---|---|---|
| 🤍 Minimal (简约) | Clean black & white | Daily articles, announcements |
| 💜 Tech (科技) | Purple gradient, modern | Tech blogs, product intros |
| 📖 Literary (文艺) | Serif fonts, classic feel | Essays, book reviews |
| 💙 Business (商务) | Blue tones, professional | Industry analysis, reports |
| Technology | Purpose |
|---|---|
| marked.js | Markdown parsing |
| highlight.js | Code syntax highlighting |
| Vanilla HTML/CSS/JS | UI & interactions |
| CDN | Zero-install dependency loading |
| GitHub Pages | Hosting & deployment |
md2wechat/
├── index.html # 🏠 Main app (single-file, all-in-one)
├── images/ # 🖼️ Article images & charts
├── .github/workflows/ # 🚀 GitHub Pages auto-deploy
├── *.md # 📄 Sample WeChat articles
├── LICENSE # 📄 MIT License
└── README.md # 📖 This file
Contributions are welcome! Here's how you can help:
- Fork this repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- 🎨 New themes
- 🌍 i18n / English UI
- 📱 Mobile responsive improvements
- 🧩 Custom CSS editor
- 📤 Export to HTML/PDF
Made with ❤️ for WeChat content creators
为微信公众号创作者而生
