HTML to Plain Text Converter

Strip tags from HTML or a web page URL and get readable plain text with line breaks preserved, plus word and character counts.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

Send HTML in the html field (JSON, form or query string), as a raw text/html body, or give a public url to fetch. The API removes script, style, noscript, template and head content, turns <br> and block elements (paragraphs, headings, list items, table rows, divs...) into line breaks, collapses repeated spaces and returns the text with its characters and words counts.

Unlike HTML to Markdown, no formatting is kept: the result is plain text suitable for search indexing, previews, SMS or text-only emails.

Limits: HTML up to 5 MB (request body up to 6 MB); URLs are fetched up to 5 MB with a 10 second timeout and at most 8 redirects. Only public http/https hosts are allowed.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/html-to-text" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Order confirmed</h1><p>Thanks for your order, <b>Alice</b>.<br>It ships tomorrow.</p><ul><li>1 x Keyboard</li><li>2 x Mouse</li></ul><style>p{color:red}</style>"}'

API documentation → Get a free API key

FAQ

Are line breaks preserved?

Yes. <br> and block elements such as p, div, li, headings and table rows produce new lines; three or more blank lines are collapsed.

Is JavaScript and CSS content removed?

Yes. script, style, noscript, template and head elements are removed before the text is extracted.

Can I extract text directly from a URL?

Yes. Send url instead of html; the page is fetched (up to 5 MB) and converted.