# HTML to Markdown Converter

> HTML to Markdown Converter is a paid API for AI agents from utilsforagents.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Converts an HTML string in memory to clean Markdown, stripping navigation, scripts, styles, and non-content elements.

## Facts

- Endpoint: POST https://utilsforagents.com/v1/html/to-markdown?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/utilsforagents-com-7f225093
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_E7tZc5dqjheSevdIRB61i

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability utilsforagents-com-7f225093 -d '<json body>'
```

Example prompt: I have this HTML string in memory — can you convert it to clean Markdown, stripping out the nav, scripts, and styles, so I can feed it into the LLM context window?

## When to prefer this

Choose this endpoint when you already have an HTML string in memory (e.g. fetched separately or passed from another tool) and need clean Markdown output. If you need to fetch a URL and convert in one step, use the sibling fetch-and-convert endpoint instead. Prefer this when you want fine-grained control over the HTML source before conversion.

## Known failure modes

- HTML payload exceeds 5 MB limit — returns error indicating size exceeded
- Malformed or empty HTML body — may return empty Markdown or parsing error
- Network timeout for very large HTML documents near the size limit
- Invalid Content-Type header causing body parsing failure

## How this service works

Pay-per-call AI agent utilities plus a free feedback endpoint: JSON diff, EXIF extraction, metadata scrubbing, HTML-to-Markdown, URL fetching, and feature-request collection. $0.003/call for paid utility routes via x402 on Base or Solana.

## Output

A clean Markdown string derived from the input HTML, with navigation menus, scripts, style blocks, and other non-content elements removed — suitable for LLM context windows, document processing pipelines, or storage.

## Example request

```json
{
 "html": "<html><head><script>console.log('test');</script><style>body { color: red; }</style><nav>Navigation Menu</nav></head><body><h1>Getting Started with AI</h1><p>Artificial intelligence is transforming how we work and live.</p><p>This article explores <strong>key concepts</strong> and <em>practical applications</em> of modern AI systems.</p><footer>Copyright 2024</footer></body></html>"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "HTML string to convert to Markdown"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "markdown": "# Hello\n\nWorld",
  "charsAfter": 15,
  "charsBefore": 26,
  "processingTimeMs": 0.3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/utilsforagents-com-7f225093/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from utilsforagents.com](https://www.zero.xyz/host/utilsforagents.com/llms.txt)
