Markdown Converter

Convert PDF to Markdown—including scanned PDFs with local OCR—plus DOCX, XLSX, PPTX, HTML, CSV, JSON, XML, and TXT. Then turn editable Markdown into searchable PDF, Office, ebook, publishing, data, text, or image files. This product-neutral Agent Skill works with Codex, Claude Code, and other agents that support the open Agent Skills format.

  • Runs locally with Node.js 20 or newer.
  • Does not call a website or conversion API.
  • Reads text PDFs and performs local OCR on image-only scanned PDF pages.
  • Creates searchable, selectable text PDFs instead of page screenshots.
  • Adds no logo, watermark, attribution, or promotional footer to generated files.

Why use this Skill?

  • Both directions: it reads common documents into editable Markdown and exports Markdown to 23 targets.
  • Scanned PDF support: bundled OCR handles printed English, Spanish, German, Japanese, and Simplified Chinese without uploading the document.
  • No setup during a task: the conversion runtime, OCR worker, language data, fonts, and artifact verifier are included.
  • Artifact checks: generated PDF, Office, ebook, text, data, and image files are verified as real and non-empty before completion.
  • Private output: conversion stays local and generated files contain no watermark or promotional branding.

Install

Install with the open skills CLI:

npx skills add agent-tools-lab/markdown-converter --skill markdown-converter

Install globally for Codex:

npx skills add agent-tools-lab/markdown-converter --skill markdown-converter -g -a codex -y

Install globally for Claude Code:

npx skills add agent-tools-lab/markdown-converter --skill markdown-converter -g -a claude-code -y

You can also copy skills/markdown-converter into your agent's project or global skills directory.

What it can read

Every supported input is converted to editable Markdown first. The Markdown can then be saved directly or converted to any supported output.

Input Extensions or source What is preserved Main limits
Markdown .md, .markdown Original Markdown source A different target may normalize syntax
HTML .html, .htm Headings, paragraphs, lists, links, code, simple tables CSS, scripts, layout, and widgets are removed
Plain text .txt Text and recognizable lists Formatting absent from the source cannot be recovered
CSV .csv Headers, rows, quoted cells Styles and spreadsheet behavior are not present
JSON .json Objects, arrays, keys, and scalar values Application-specific schema meaning is not inferred
XML .xml Elements, values, and supported attributes Mixed content and namespaces may be simplified
Word .docx Paragraphs, headings, lists, links, and simple tables Complex layout, media, comments, tracked changes, and macros may be lost
Excel .xlsx, .xls Sheet data as Markdown tables Formulas, styles, charts, and workbook behavior are not preserved
PowerPoint .pptx Slide titles and readable text in presentation order Design, animation, media, notes, and exact spacing are not preserved
PDF with text layer .pdf Searchable text, likely headings, bullets, and paragraphs Original layout, columns, tables, equations, and typography may simplify
Scanned PDF image-only .pdf pages Printed raster text through local OCR Proofreading is required; no handwriting or guaranteed table/layout recovery

PDF OCR languages

  • English (eng)
  • Spanish (spa)
  • German (deu)
  • Japanese (jpn)
  • Simplified Chinese (chi_sim)

PDF input limits are 30 MB, 100 total pages, and 20 OCR pages per file. OCR runs only on pages without a usable text layer and never uploads the PDF as a fallback.

What it can create

The --to value below is the exact CLI target name. Aliases such as md, txt, jpeg, word, excel, and powerpoint are also accepted.

Output --to value Typical extension Notes
Markdown markdown .md Editable Markdown
Formatted Markdown formatted-markdown .md Conservative syntax and spacing normalization
HTML html .html Sanitized standalone HTML
Plain text text .txt Formatting intentionally removed
CSV csv .csv Extracts a real Markdown table
Markdown token JSON json .json Markdown syntax tree, not arbitrary business JSON
Searchable PDF pdf .pdf A4 PDF with selectable text and embedded CJK-capable fonts
Word docx .docx Structured OOXML document; images currently become text placeholders
Excel xlsx .xlsx Tables become sheets; prose is placed on a content sheet
PowerPoint pptx .pptx Text-oriented slides without animation or presenter notes
EPUB epub .epub Local EPUB package; advanced navigation and external media are limited
LaTeX latex .tex Inspect complex math, tables, and code after conversion
AsciiDoc asciidoc .adoc Semantic text conversion
Rich Text Format rtf .rtf Inspect complex Unicode and layout-sensitive content
reStructuredText rst .rst Inspect complex tables after conversion
Confluence Wiki Markup confluence .txt Legacy Wiki Markup, not universal modern Confluence Cloud paste
Notion-oriented Markdown notion .md Import-oriented Markdown, not a Notion API import
Reveal slides slides .html Standalone Reveal HTML opened in a browser
WeChat HTML wechat-html .html Sanitized publishing HTML; final appearance depends on the editor
Mind-map model mindmap-json .json Heading hierarchy data, not a rendered image
PNG document image png .png 900 px wide, up to 16,000 px tall; rejects overflow instead of clipping
JPG document image jpg .jpg White background, quality 90, same height and media limits as PNG
Card image card .png Designed 1280×960 summary in light or dark theme; long content is shortened

Use it directly

After installation, an agent should follow SKILL.md. The bundled CLI can also be called directly:

node skills/markdown-converter/scripts/runtime/convert.mjs INPUT --to FORMAT -o OUTPUT

Examples:

# Read a searchable PDF as Markdown
node skills/markdown-converter/scripts/runtime/convert.mjs report.pdf --to markdown -o report.md

# OCR a scanned PDF locally
node skills/markdown-converter/scripts/runtime/convert.mjs scan.pdf --to markdown --ocr-language eng -o scan.md

# Create a searchable text PDF
node skills/markdown-converter/scripts/runtime/convert.mjs notes.md --to pdf -o notes.pdf

# Convert Word to Markdown and then to another format
node skills/markdown-converter/scripts/runtime/convert.mjs report.docx --to markdown -o report.md
node skills/markdown-converter/scripts/runtime/convert.mjs report.md --to html -o report.html

# Generate an image without a watermark
node skills/markdown-converter/scripts/runtime/convert.mjs notes.md --to png -o notes.png

List the machine-readable capabilities before promising an unfamiliar conversion:

node skills/markdown-converter/scripts/runtime/convert.mjs --capabilities

Verify every generated artifact:

python3 skills/markdown-converter/scripts/verify_output.py OUTPUT --format FORMAT

Conversion model

supported input
      ↓
editable Markdown
      ↓
supported output

This makes conversions such as PDF → Markdown → DOCX or DOCX → Markdown → searchable PDF possible without a server. It does not imply pixel-perfect round trips: the Skill preserves readable structure within the limits listed above.

Privacy and output policy

  • Files are processed on the local machine.
  • No input, output, filename, or extracted text is sent to ilovemd.net.
  • Generated files contain no ilovemd logo, watermark, promotional link, or hidden product metadata.
  • The attribution below belongs to this repository README only and is never injected into converted files.

License

The repository's original files are available under the MIT License. Bundled fonts, OCR data, WebAssembly modules, and JavaScript components retain their respective licenses; see skills/markdown-converter/assets/licenses/THIRD-PARTY-NOTICES.md and the adjacent license files.


Powered by ilovemd.net — free online Markdown tools and converters. Learn the syntax with the Markdown Cheat Sheet: syntax and examples.