# agent402.tools HTML to Markdown Converter

> agent402.tools HTML to Markdown Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts an HTML fragment or full document into clean Markdown text

## Facts

- Endpoint: POST https://agent402.tools/api/html-to-markdown
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-html-to-markdown-converter-056fa7b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yRisI82gYuSiX4aBesaWv

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 agent402-tools-html-to-markdown-converter-056fa7b4 -d '<json body>'
```

Example prompt: Can you convert this HTML snippet I already have into clean markdown? Here's the HTML: '<h1>Hello World</h1><p>This is a <strong>test</strong> paragraph with a <a href="https://example.com">link</a>.</p>'

## When to prefer this

Use this endpoint when you already have raw HTML in memory and need to convert it to Markdown without fetching any URL. If you need to fetch a live URL and convert it, use the /api/extract endpoint instead. Prefer this over manual regex stripping when clean, structured Markdown output is required.

## Known failure modes

- HTML input exceeds 100KB limit — request rejected
- Malformed or unparseable HTML — may return partial or empty markdown
- Missing 'html' field in request body — validation error
- Payment not included or invalid — 402 payment required response

## How this service works

Convert an HTML fragment or document you already have into clean markdown. (To fetch + convert a live URL, use /api/extract.)

## Output

Returns clean Markdown text converted from the provided HTML input, preserving headings, links, bold/italic formatting, lists, and other structural elements in standard Markdown syntax

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "HTML text (max 100KB)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "markdown": "# Hi\n\n**bold**"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-html-to-markdown-converter-056fa7b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
