# 402utils HTML-to-Markdown Converter

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

Converts raw HTML into clean GitHub-Flavored Markdown, with an optional article extraction mode that uses Mozilla Readability to isolate main content and strip boilerplate.

## Facts

- Endpoint: POST https://402utils.com/v1/html-to-md?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-html-to-markdown-converter-5f6772ea
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4WKy28BatECDGr-70wMfO

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 402utils-html-to-markdown-converter-5f6772ea -d '<json body>'
```

Example prompt: Take this raw HTML and convert it to GitHub-Flavored Markdown using article mode so it strips out the nav, footer, and sidebars and just gives me the main content with the title and byline.

## When to prefer this

Use this endpoint when you have raw HTML in hand and need clean GFM Markdown output without fetching any URLs yourself. Prefer article mode when the HTML is a full webpage with navigation and boilerplate you want discarded. Prefer over general-purpose LLM conversion when you need deterministic, structured GFM features like pipe tables, fenced code blocks, and task lists reliably preserved.

## Known failure modes

- HTML payload exceeds 5 MB limit — returns error
- Empty HTML body provided — returns validation error
- Invalid mode value (not 'full' or 'article') — returns validation error
- Malformed JSON envelope — returns parse error
- Article mode finds no identifiable article — falls back to full conversion with articleFound=false

## How this service works

Micro API utilities for AI agents, priced per call and paid in USDC over the x402 protocol. PDF, screenshot, OG-image and more — no signup, no keys.

## Output

Returns a Markdown string in GFM format with ATX headings, fenced code blocks, pipe tables, strikethrough, and task lists. In article mode, also returns title, byline, excerpt, and an articleFound boolean. Script, style, and iframe text are always stripped. If no article is detected in article mode, falls back to full-document conversion with articleFound=false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "HTML document or fragment to convert (non-empty, max 5 MB UTF-8)."
  },
  "mode": {
   "enum": [
    "full",
    "article"
   ],
   "type": "string",
   "default": "full",
   "description": "'full' converts the whole document. 'article' first extracts the main content with Mozilla Readability — boilerplate (nav, footer, sidebars) is dropped, title/byline/excerpt are returned, and relative URLs are resolved against https://input.invalid/ so they stay recognisable; when no article is detected the response falls back to full-document conversion with articleFound=false."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "full",
  "markdown": "# Q3 results\n\nRevenue grew **18%**.\n\n| Region | Growth |\n| --- | --- |\n| EMEA | +21% |"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-html-to-markdown-converter-5f6772ea/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
