{"uid":"cap_upM_dV8kGSj8P-mFxE_5Q","slug":"html-to-plain-text-converter-4fdde0ec","name":"HTML to Plain Text Converter","description":"Turn supplied HTML into readable text: keeps paragraphs, lists, table rows and link text; drops script, style, hidden.","url":"https://markup-tools.x402tookit.com/html-to-text?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["html"],"properties":{"base":{"type":"string","description":"Optional absolute http(s) URL used to resolve relative links when links=true"},"html":{"type":"string","description":"HTML to convert, up to 20000 characters (the URL query string limits practical size; longer is refused with 400)"},"links":{"type":"boolean","description":"true to append each link's URL after its text (default false)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"text":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"linkCount":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"imageCount":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"characterCount":{"type":["null","number"]},"hiddenElements":{"type":["array","null"],"items":{"type":"object","properties":{"tag":{"type":["null","string"]},"text":{"type":["null","string"]},"reason":{"type":["null","string"]}}}},"parserTruncated":{"type":["boolean","null"]},"hiddenCharacters":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ozpF-gpnp4VPEMAtTgZN-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts raw HTML into clean, readable plain text, preserving paragraphs, lists, table rows, and link text while stripping scripts, styles, and hidden elements.","exampleAgentPrompt":"Take this HTML and convert it to plain text, keeping the paragraphs and list structure but dropping all the scripts and styling — also append each link's URL after its link text: <html><body><h1>Hello</h1><ul><li><a href='/about'>About</a></li></ul></body></html>","exampleUseCases":[{"title":"Clean email HTML for LLM input","prompt":"I have this HTML email body and I need it as clean plain text so I can feed it into my summarization model — strip all the tags, keep the paragraph structure, and drop any hidden elements: <table><tr><td><p>Dear John,</p><p>Your order has shipped.</p></td></tr></table>"},{"title":"Readable newsletter archive","prompt":"Convert this newsletter HTML into readable plain text and include each link's URL after the link text so I can see where everything points — here's the HTML: <div><h2>Weekly Digest</h2><p>Check out <a href='https://example.com'>this article</a>.</p></div>"},{"title":"Accessibility text preview from webpage HTML","prompt":"I've got the raw HTML of a product page and I want to see what a screen reader would roughly output — give me the plain text version with paragraphs and list items preserved, no scripts or styles: <html><body><h1>Product Name</h1><ul><li>Feature A</li><li>Feature B</li></ul><script>alert(1)</script></body></html>"}],"resultDescription":"Returns a JSON object containing the extracted plain text, character count, link count, image count, a flag indicating whether the parser truncated the input, and an array of hidden elements that were dropped (each with tag, text, and reason).","failureModes":["HTML input exceeds 20,000 characters — returns HTTP 400","Missing required 'html' query parameter — returns HTTP 400","Malformed or non-UTF-8 HTML may produce garbled text output","Very large inline scripts or styles may inflate hidden element reporting"],"whenToPreferThis":"Choose this endpoint when you need a fast, structure-preserving HTML-to-text conversion that explicitly reports dropped hidden elements, link counts, and image counts. Prefer it over generic regex-based stripping when you need paragraph and list fidelity, or when downstream processing requires auditable metadata about what was removed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:30:42.938Z","isFirstParty":false,"canonicalSlug":"html-to-plain-text-converter-4fdde0ec"}