{"uid":"cap_yRisI82gYuSiX4aBesaWv","slug":"agent402-tools-html-to-markdown-converter-056fa7b4","name":"agent402.tools HTML to Markdown Converter","description":"Convert an HTML fragment or document you already have into clean markdown. (To fetch + convert a live URL, use /api/extract.)","url":"https://agent402.tools/api/html-to-markdown","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string","description":"HTML text (max 100KB)"}}},"responseSchema":{"type":"json","example":{"markdown":"# Hi\n\n**bold**"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WHUvir3O-wRryYX0SkKjW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts an HTML fragment or full document into clean Markdown text","exampleAgentPrompt":"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>'","exampleUseCases":null,"resultDescription":"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","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.629Z","isFirstParty":false}