Convert HTML to Text
Paste HTML and get Text back. Free, no signup, and nothing you paste is stored. The same conversion is available as an API call and to AI agents over MCP.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
How to convert HTML to Text
- Paste your HTML into the input box.
- Press Run.
- Copy the Text or download it as a file.
This page runs the html to plain text tool. Open the tool itself for every option.
What happens in this conversion
- What you get
- The readable text: headings, paragraphs, list items and table rows. Scripts, styles and menus are dropped.
- Links
- Turn links on to write each address in brackets after its text.
HTML and Text compared
| Format | What it is | Best for | Watch out for |
|---|---|---|---|
| HTML web page | HTML is the language web pages are written in: text wrapped in tags, with menus, scripts and styling around it. | Pages shown in a browser. | The readable content is buried in markup, navigation and scripts. |
| Text plain text | Plain text is characters and line breaks, nothing else. Every program on every system can open it. | Searching, copying and feeding text to other programs. | It has no headings, tables, fonts or pictures. |
Use it from code or an agent
curl -s https://setget.net/v1/tools/html-to-text \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"<html><head><title>Demo</title><style>p{color:red}</style></head><body><nav>Menu</nav><h1>Hello & welcome</h1><p>Read the\n <a href=\"/docs\">docs</a>.</p><ul><li>One</li><li>Two</li></ul></body></html>","links":true}}'
import json, urllib.request
body = {'input': {'text': '<html><head><title>Demo</title><style>p{color:red}</style></head><body><nav>Menu</nav><h1>Hello & welcome</h1><p>Read the\n <a href="/docs">docs</a>.</p><ul><li>One</li><li>Two</li></ul></body></html>', 'links': True}}
request = urllib.request.Request("https://setget.net/v1/tools/html-to-text", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/html-to-text", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"<html><head><title>Demo</title><style>p{color:red}</style></head><body><nav>Menu</nav><h1>Hello & welcome</h1><p>Read the\n <a href=\"/docs\">docs</a>.</p><ul><li>One</li><li>Two</li></ul></body></html>","links":true}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "html-to-text",
"input": {
"text": "<html><head><title>Demo</title><style>p{color:red}</style></head><body><nav>Menu</nav><h1>Hello & welcome</h1><p>Read the\n <a href=\"/docs\">docs</a>.</p><ul><li>One</li><li>Two</li></ul></body></html>",
"links": true
}
}
{
"input": {
"text": "<html><head><title>Demo</title><style>p{color:red}</style></head><body><nav>Menu</nav><h1>Hello & welcome</h1><p>Read the\n <a href=\"/docs\">docs</a>.</p><ul><li>One</li><li>Two</li></ul></body></html>",
"links": true
}
}
Endpoint: POST /v1/tools/html-to-text. Over MCP: run_tool with slug: "html-to-text".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | The HTML to convert. |
links |
boolean | no | Add each link address in brackets after its text. Default: false. |
Questions
- Is my HTML stored anywhere?
- No. It is converted in memory and discarded. It is not saved or logged.
- How much HTML can I convert at once?
- Up to 1 MiB in a single request.
- Can a script or an AI agent convert HTML to Text?
- Yes. Call POST https://setget.net/v1/tools/html-to-text with JSON, or use the run_tool tool of the SetGet MCP server with slug "html-to-text". The code samples on this page are ready to copy.
More conversions
Related tools
- HTML link extractorList every link and image in HTML, with link text, resolved address, rel values and internal or external.
html-extract-links - HTML to MarkdownTurn a saved web page into Markdown: the main content, without menus, scripts and styling.
html-to-markdown - Open Graph and meta tag extractorPull the title, description, canonical link, Open Graph, Twitter card, favicons and JSON-LD out of HTML.
og-tags-extract - HTML minifierShrink HTML by removing comments and needless white space, without touching pre, textarea, script or style.
html-minify - .gitignore testerCheck which paths a .gitignore file ignores and which line decided each one, using real Git matching rules.
gitignore-test - Cache-Control explainerExplain a Cache-Control header directive by directive and how browsers and CDNs will treat the response.
cache-control-explain