To convert between markdown, HTML, and PDF formats in OpenClaw, run `clawhub install markdown-converter` in your terminal and start typing conversion requests in OpenClaw chat. The skill handles format conversion for text documents without any API key — just paste your content or provide a file path and specify the target format, and the converted output is returned instantly.
Convert Documents Between Formats Without Leaving OpenClaw
The Markdown Converter skill brings format conversion into your OpenClaw workflow, eliminating the need to switch to external tools like Pandoc, online converters, or paid document apps. You can convert a markdown README to a styled HTML page for your documentation site, export a formatted report to PDF for sharing, clean up messy HTML into readable markdown for processing, or strip formatting entirely to extract plain text. All of this happens directly in OpenClaw chat with a simple natural language command.
One common use case is documentation workflows: technical writers and developers frequently need content in multiple formats simultaneously — markdown for version control and editing, HTML for web publishing, and PDF for external distribution. Rather than maintaining separate export pipelines, the Markdown Converter skill lets OpenClaw act as a single conversion point that handles all three output formats from the same source document.
The Markdown Converter differs from the Summarize skill in a fundamental way: it changes the format of your document without changing its content. Summarize reduces a long document to a shorter version by removing content. Markdown Converter preserves all the content while changing how it is encoded and structured. Both skills are often used together — summarize first to get a concise version, then convert to the target format for sharing.
Integration method
Markdown Converter is available as a native ClawHub skill, installed with a single `clawhub install` command and running entirely inside OpenClaw. The skill performs format conversion locally — no external service is called, no API keys are required, and your document content never leaves your machine. You paste content or provide a file path in OpenClaw chat and specify the target format, and the conversion happens in seconds.
Prerequisites
- OpenClaw installed and running (see openclaw.ai for installation instructions)
- ClawHub CLI available in your terminal (comes bundled with OpenClaw)
- Terminal/command line access to run the clawhub install command
- Source documents ready to convert (markdown, HTML, plain text, or other supported formats)
- For PDF output: a PDF rendering library may be required depending on your OS — the skill will prompt you if any dependencies need to be installed
Step-by-step guide
Install the Markdown Converter Skill via ClawHub
Install the Markdown Converter Skill via ClawHub
Open your terminal and run the clawhub install command to add the markdown-converter skill to your OpenClaw instance. This skill is one of the simplest to install because it requires no external API key — the conversion logic runs entirely within OpenClaw using built-in libraries. The installation downloads the skill package, validates it, and registers it with your local OpenClaw configuration. You will see a confirmation message with the installed version number and a list of supported input and output formats. Depending on your operating system, the installer may also check for PDF rendering dependencies (like a headless browser or wkhtmltopdf) and prompt you to install them if PDF output is needed. If you see `clawhub: command not found`, verify your OpenClaw installation is complete and the ClawHub binary is on your system PATH. Run `clawhub --version` to confirm ClawHub is available.
1clawhub install markdown-converterPro tip: After installation, run `clawhub info markdown-converter` to see the full list of supported input and output formats. Common formats include: markdown (.md), HTML (.html), PDF (.pdf), plain text (.txt), reStructuredText (.rst), and EPUB (.epub).
Expected result: Terminal shows 'markdown-converter@X.X.X installed successfully'. The skill appears in `clawhub list` output. No API key configuration is required.
Test the Skill with a Simple Conversion in OpenClaw Chat
Test the Skill with a Simple Conversion in OpenClaw Chat
Open OpenClaw chat and paste a small piece of markdown content with a request to convert it to your target format. The skill recognizes natural language conversion requests and handles them without requiring a specific command syntax. For your first test, try converting a short markdown snippet to HTML. This is the fastest conversion (no PDF renderer needed) and lets you verify the skill is working correctly before attempting more complex conversions. Paste a few lines of markdown with headings, bold text, and a bullet list — these elements are good tests of whether the conversion is preserving formatting correctly. The converted output is returned inline in OpenClaw chat for small conversions, or saved to a file for larger documents. The skill reports the file path when output is saved to disk. By default, converted files are saved to `~/openclaw-output/conversions/` with a timestamp prefix.
Convert the following markdown to HTML and show me the result inline: # Hello World This is a **bold statement** and this is *italic*. - Item one - Item two - Item three
Paste this in OpenClaw chat
Pro tip: For quick test conversions, ask OpenClaw to show the output inline rather than saving to a file. For production use with larger documents, ask it to save to a specific file path so you can review the output in a proper viewer.
Expected result: OpenClaw returns the converted HTML inline in the chat, showing the markdown correctly transformed to HTML tags with proper heading, bold, italic, and list formatting.
Convert Markdown to PDF for Professional Sharing
Convert Markdown to PDF for Professional Sharing
PDF conversion is the most commonly used feature of the Markdown Converter skill, as it produces a portable document that recipients can open on any device without needing markdown-aware software. To convert a markdown file to PDF, provide the file path or paste the content and specify PDF as the output format. The skill applies a default stylesheet that makes headings, code blocks, and lists look clean and professional. You can specify a custom CSS stylesheet in the skill config if you need branded PDF output matching your organization's design. PDF generation requires a rendering engine — on most systems, the skill uses a headless browser or wkhtmltopdf. If these are not installed, the skill will tell you exactly what to install and provide the installation command. On macOS, Homebrew makes this straightforward: `brew install wkhtmltopdf`. For documents with images, ensure the image paths in your markdown are absolute paths or publicly accessible URLs. Relative image paths often break during PDF conversion because the rendering engine resolves paths from a different working directory than your markdown file.
Convert the markdown file at ~/reports/q1-summary.md to a PDF. Save the output as ~/reports/q1-summary.pdf and use a clean professional style.
Paste this in OpenClaw chat
1# Convert a specific file to PDF via clawhub CLI2clawhub run markdown-converter --input ~/reports/q1-summary.md --output ~/reports/q1-summary.pdf --format pdf34# Install PDF rendering dependency on macOS if needed5brew install wkhtmltopdf67# Install on Ubuntu/Debian8apt-get install wkhtmltopdfPro tip: If your PDF output has font rendering issues (garbled characters or missing fonts), check that your markdown content only uses Unicode characters supported by the default PDF stylesheet fonts. For documents with special characters or non-Latin scripts, specify a custom font in the skill's CSS config.
Expected result: A PDF file is created at the specified output path. Opening the PDF shows properly formatted content with clean headings, readable body text, styled code blocks, and correctly rendered lists and tables.
Configure Default Settings and Batch Conversion
Configure Default Settings and Batch Conversion
The markdown-converter skill supports a YAML configuration file that sets defaults for output format, styling, file paths, and batch processing behavior. Setting these defaults reduces the amount of detail you need to include in each conversion prompt. Batch conversion is particularly useful for teams maintaining documentation sites or knowledge bases. The skill can process all files matching a glob pattern in a single command, converting an entire folder of markdown files to HTML with consistent styling. The batch mode preserves the original folder structure in the output directory. RapidDev offers OpenClaw workflow reviews for teams integrating document conversion into automated content pipelines — for example, pairing markdown-converter with the Notion or Obsidian integration to convert imported notes automatically. You can also combine the markdown-converter skill with the summarize skill in a two-step workflow: first summarize a long HTML article to extract the key content, then convert the summary to a markdown format for storage in your knowledge base.
Convert all markdown files in ~/docs to HTML and save them in ~/docs/html/, preserving the folder structure. Use a dark-themed stylesheet.
Paste this in OpenClaw chat
1# Configure skill defaults in ~/.openclaw/skills/markdown-converter.yaml2markdown-converter:3 default_output_format: html # html | pdf | txt | rst | epub4 output_directory: ~/conversions # default output location5 preserve_folder_structure: true # maintain directory hierarchy in batch mode6 css_theme: default # default | minimal | dark | custom7 custom_css_path: "" # path to custom CSS file (optional)8 include_toc: false # add table of contents to long documents9 open_after_convert: false # auto-open converted file when donePro tip: Set `open_after_convert: true` during development so you can immediately see each conversion result. Disable it for batch processing to avoid opening 50 browser tabs when converting a whole documentation folder.
Expected result: Batch conversion processes all matching files and saves HTML output to the configured directory. The folder structure is preserved and each output file shares the same name as the source with the new extension.
Common use cases
Markdown to PDF for Professional Distribution
Convert a markdown-formatted report, proposal, or README to a polished PDF for emailing to clients or stakeholders who do not use markdown editors. The skill applies sensible default styling to headings, code blocks, lists, and tables so the output looks professional without requiring manual formatting.
Convert this markdown document to a PDF and save it to my desktop. Apply a clean, professional style with the company name 'Verdant Analytics' in the header: [paste markdown content]
Copy this prompt to try it in OpenClaw
HTML to Clean Markdown for Knowledge Base Import
Convert HTML pages scraped from websites, CMS exports, or documentation portals into clean markdown files suitable for importing into Obsidian, Notion, or a git-based knowledge base. The skill strips navigation chrome, ads, and irrelevant HTML while preserving the meaningful content structure.
Convert the following HTML content to clean markdown, removing navigation elements, ads, and any inline styles. Preserve headings, links, code blocks, and ordered lists: [paste HTML]
Copy this prompt to try it in OpenClaw
Batch Documentation Format Conversion
Convert an entire folder of markdown files to HTML for deployment to a static documentation site, or convert HTML documentation exports to markdown for migration to a new platform. The skill supports batch operations via its CLI mode, processing multiple files in a single command.
List all the markdown files in my ~/docs folder and convert each one to HTML, saving the output files in ~/docs/html/ with the same filename but .html extension.
Copy this prompt to try it in OpenClaw
Troubleshooting
PDF conversion fails with 'wkhtmltopdf not found' or 'PDF renderer not available'
Cause: The PDF rendering dependency is not installed on your system. The Markdown Converter skill requires an external rendering tool for PDF output because PDF generation requires a layout engine.
Solution: Install wkhtmltopdf using your system's package manager. On macOS use Homebrew, on Ubuntu/Debian use apt-get. After installing, run `clawhub reload` and retry the PDF conversion.
1# macOS2brew install wkhtmltopdf34# Ubuntu/Debian5sudo apt-get install wkhtmltopdf67# Reload OpenClaw8clawhub reloadclawhub install markdown-converter fails with '429 Too Many Requests' or times out
Cause: ClawHub's skill registry is experiencing temporary rate limiting. This is a registry-side issue unrelated to your configuration.
Solution: Wait 2-3 minutes and retry the install command. If the error persists, try `clawhub install markdown-converter --force` to clear any partial installation state before retrying.
1# Force reinstall2clawhub install markdown-converter --forceConverted HTML output has broken image references — images show as red X or missing
Cause: The source markdown uses relative image paths that the converter cannot resolve from its working directory, or the image files do not exist at the specified paths.
Solution: Update image references in your source markdown to use absolute file paths or publicly accessible URLs before conversion. For local images, use the full path: `` instead of ``.
Markdown Converter produces output with extra blank lines, inconsistent heading levels, or garbled table formatting
Cause: The source HTML or document being converted to markdown contains nested tables, non-standard HTML elements, or CSS-dependent layout that does not map cleanly to markdown's simpler structure.
Solution: Ask OpenClaw to 'clean and normalize' the output after conversion, or use the `--strict-markdown` flag in CLI mode to enforce standard CommonMark compliance. Complex HTML tables may need manual review after conversion as markdown has limited table syntax.
1# Use strict mode for cleaner markdown output2clawhub run markdown-converter --input source.html --output output.md --format markdown --strict-markdownBest practices
- Use absolute file paths in markdown documents that contain images before converting to PDF — relative paths break during rendering because the PDF engine resolves paths from a different working directory.
- Test PDF output with a small sample document before converting large files — verifying font rendering and image handling on a short test prevents surprises on important documents.
- Set a default output directory in the skill config (`output_directory`) so converted files are consistently organized and easy to find, rather than scattered across different locations.
- Combine the markdown-converter skill with summarize for a two-stage workflow: summarize long HTML articles first, then convert the summary to markdown for storage in your knowledge base.
- Use the batch conversion CLI mode for documentation site maintenance — converting an entire folder of markdown to HTML in one command is significantly faster than individual file conversions.
- Keep your source documents in markdown as the canonical format and use the skill for format-specific exports — markdown is the most portable and tool-agnostic format for long-term storage.
- For branded PDF output, create a custom CSS file matching your organization's design and set it as the `custom_css_path` in the skill config — this ensures all PDFs have consistent professional styling.
- Never paste sensitive document content into OpenClaw chat if you are using a cloud-hosted OpenClaw instance — for confidential documents, use the CLI mode with local file paths instead.
Alternatives
AI PPT Generator creates new PowerPoint presentations from scratch rather than converting existing documents — better when you need to generate slide content rather than reformat it.
Summarize condenses the content of a document rather than changing its format — use it before markdown-converter when you want a shorter, reformatted version of a long document.
Notion integration syncs documents directly to your Notion workspace rather than converting format — better when your destination is Notion rather than a local file.
Obsidian integration reads and writes markdown files directly in your Obsidian vault — better when your destination is Obsidian rather than a standalone converted file.
Frequently asked questions
How do I install Markdown Converter in OpenClaw?
Run `clawhub install markdown-converter` in your terminal. No API key is required — the skill installs and works immediately. For PDF output, you may also need to install wkhtmltopdf using your system's package manager (`brew install wkhtmltopdf` on macOS). All other format conversions work without any additional dependencies.
What formats does the OpenClaw Markdown Converter support?
The skill supports conversion between markdown (.md), HTML (.html), PDF (.pdf), plain text (.txt), reStructuredText (.rst), and EPUB (.epub). The exact list of supported formats for your installed version is shown when you run `clawhub info markdown-converter` after installation.
How do I convert a markdown file to PDF in OpenClaw?
In OpenClaw chat, type something like 'Convert the file at ~/reports/document.md to PDF and save it to ~/reports/document.pdf'. You can also use the CLI directly: `clawhub run markdown-converter --input ~/reports/document.md --output ~/reports/document.pdf --format pdf`. PDF generation requires wkhtmltopdf to be installed on your system.
ClawHub install markdown-converter is not working — what should I do?
Confirm the exact skill name: `markdown-converter` (with a hyphen, not an underscore). If the install fails with a network error or timeout, wait a few minutes and retry — ClawHub's registry occasionally experiences brief rate limits. Use `clawhub install markdown-converter --force` to clear any partial installation state before retrying.
Can I convert HTML to Markdown using the Markdown Converter skill?
Yes — the skill supports bidirectional conversion. To convert HTML to markdown, paste the HTML content in OpenClaw chat and request a markdown conversion, or use the CLI with `--format markdown`. The skill strips HTML tags and translates them to their markdown equivalents while preserving headings, links, code blocks, and lists.
Does RapidDev offer help with document conversion automation in OpenClaw?
Yes — RapidDev can help set up automated document conversion pipelines in OpenClaw, such as batch-converting documentation folders on a schedule or pairing the markdown-converter with Notion or Obsidian integrations. The individual setup on this page covers self-serve use. Teams with more complex document workflow needs can reach out to RapidDev for a configuration review.
How is the Markdown Converter different from the Summarize skill in OpenClaw?
Markdown Converter changes the format of a document without modifying its content — all the information is preserved, just encoded differently (e.g., markdown tags become HTML tags). Summarize changes the content itself, producing a shorter version with non-essential information removed. They are complementary: use Summarize first to condense a long document, then use Markdown Converter to export the summary in your target format.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation