Convert blog articles from Chinese platforms (CSDN, CNBLOG, WeChat) to Markdown/HTML format
- โ Multiple Platform Support: CSDN, CNBLOG, WeChat Official Account
- โ Dual Format Export: Markdown and HTML
- โ Batch Download: Process multiple URLs at once (comma-separated)
- โ CSDN Categories: Download entire category/column articles
- โ Clean Output: Remove ads, comments, and unnecessary elements
- โ Web UI: Simple browser interface
- โ API Mode: RESTful API for integration
Java 17+
Maven 3.6+# Clone repository
git clone https://github.com/copyboy/html2md.git
cd html2md
# Build
mvn clean package
# Run
java -jar target/html2md.jar
# Access in browser
http://localhost:8090/tool/html2mdOnline Tool: https://api.zhangqingdong.cn/tool/html2md
Just paste your article URL and click convert!
# CSDN Article
https://blog.csdn.net/username/article/details/123456789
# CNBLOG Article
https://www.cnblogs.com/username/p/123456.html
# WeChat Official Account
https://mp.weixin.qq.com/s/xxxxxxxxxxxxx# Multiple URLs (comma-separated)
https://blog.csdn.net/user1/article/details/111,
https://www.cnblogs.com/user2/p/222.html,
https://mp.weixin.qq.com/s/xxx# Download entire category
https://blog.csdn.net/username/category_8584136.html- Backend: Spring Boot 2.x
- HTML Parser: Jsoup
- Markdown Converter: Flexmark
- Web Server: Embedded Tomcat
| Platform | Status | Format | Batch | Notes |
|---|---|---|---|---|
| CSDN | โ | MD/HTML | โ | Supports categories |
| CNBLOG | โ | MD/HTML | โ | Use HTML if MD has issues |
| โ | MD/HTML | โ | Official Account only | |
| Juejin | โณ | - | - | Coming soon |
| Jianshu | โณ | - | - | Coming soon |
POST http://localhost:8090/api/convert
Content-Type: application/json
{
"url": "https://blog.csdn.net/xxx/article/details/123",
"format": "markdown" // or "html"
}{
"success": true,
"title": "Article Title",
"content": "# Article Content\n\n...",
"author": "Author Name"
}Click to expand
Web Interface:
- Simple input form
- Real-time conversion
- Download button
Output Example:
- Clean Markdown format
- Preserved code blocks
- Maintained image links
Contributions are welcome!
- Add new platform enum in
HostEnums - Get page content ID selector
- Implement parser logic
- Add tests
- Submit PR
# Run tests
mvn test
# Code format
mvn spotless:apply- โจ Added WeChat Official Account support
- ๐ Fixed CNBLOG code block issues
- ๐ Improved documentation
- ๐ Initial release
- โ CSDN & CNBLOG support
- Jsoup - HTML parser
- Flexmark - Markdown processor
- Spring Boot - Application framework
- Issues: GitHub Issues
- Email: copy_boy@126.com
- Blog: i.zhangqingdong.cn
If you find this project helpful, please give it a star! โญ
Made with โค๏ธ by copyboy
๐ HTML2MD - Blog Article Converter
Convert Chinese blog articles to Markdown/HTML format with ease
HTML2MD is a Java-based tool that helps you convert blog articles from popular Chinese platforms (CSDN, CNBLOG, WeChat Official Accounts) into clean Markdown or HTML format.
Perfect for:
- ๐ Content Migration: Move your articles to new platforms
- ๐พ Backup: Archive your blog posts locally
- ๐ Reuse: Repurpose content for documentation
- ๐ Format Conversion: Convert between HTML and Markdown
- Multi-Platform Support: Works with CSDN, CNBLOG, and WeChat
- Clean Output: Removes ads, comments, and clutter
- Batch Processing: Convert multiple articles at once
- Live Demo: Try it online without installation
- API Available: Integrate into your workflow
# 1. Clone
git clone https://github.com/copyboy/html2md.git
# 2. Build
mvn clean package
# 3. Run
java -jar target/html2md.jar
# 4. Open browser
http://localhost:8090/tool/html2md- Paste article URL
- Select output format (Markdown/HTML)
- Click "Convert"
- Download result
That's it! ๐
- Java 17+
- Spring Boot 2.x
- Jsoup (HTML parsing)
- Flexmark (Markdown)
PRs welcome! Please:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push and submit a PR
MIT License - see LICENSE file