html_to_text

Pack: htmltext · Endpoint: https://gateway.pipeworx.io/htmltext/mcp

Convert HTML to readable plain text (keyless, offline): drops scripts/styles/comments, converts block elements to newlines, decodes entities, and collapses whitespace. Ideal for cleaning scraped HTML.

Parameters

NameTypeRequiredDescription
htmlstringyesThe HTML to convert.

Example call

Arguments

{
  "html": "<html><body><h1>Welcome</h1><p>This is a <strong>test</strong> page.</p><script>console.log('hidden');</script></body></html>"
}

curl

curl -X POST https://gateway.pipeworx.io/htmltext/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"html_to_text","arguments":{"html":"<html><body><h1>Welcome</h1><p>This is a <strong>test</strong> page.</p><script>console.log('\''hidden'\'');</script></body></html>"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('html_to_text', {
  "html": "<html><body><h1>Welcome</h1><p>This is a <strong>test</strong> page.</p><script>console.log('hidden');</script></body></html>"
});

More examples

{
  "html": "<div><p>First paragraph</p><p>Second paragraph</p></div><footer>Copyright 2024</footer>"
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "htmltext": {
      "url": "https://gateway.pipeworx.io/htmltext/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 15, 2026