Skip to content

Menu

HTML to Text

Strip HTML tags, extract plain text

Runs entirely in your browserText & DiffFree, no sign-up
Loading tool

01What is HTML to Text?

Copying text out of HTML looks easy until the markup fights back. Scripts, inline styles, nested lists, tables and entities like © or ’ all get in the way of a clean result. This tool hands your markup to the browser's own DOMParser, the same HTML parser that builds real web pages, and then walks the document tree it produces. That means sloppy markup is handled the way a browser would handle it. Unclosed tags get closed, attributes in any quoting style work, and every named or numeric entity decodes to the right character, following the parsing rules in the WHATWG HTML Living Standard. The parsed document is detached from the page, so no script runs and no image or stylesheet is fetched. Elements that hold no readable text are skipped entirely: script, style, noscript, template, iframe, object, svg, canvas and anything in the head. You get three output modes. Text Only collapses runs of whitespace the way a browser does, puts a blank line between paragraphs, headings and tables, writes list items with a • bullet or 1., 2. numbering, and indents nested lists two spaces per level. Table rows become tab-separated lines. Structured keeps the same text but marks headings with = signs, six for an h1 and one for an h6, indents list items and keeps an hr as ---. Markdown follows CommonMark conventions plus GitHub's pipe tables. It writes # headings, **bold**, *italic*, `code`, [text](url) links, ![alt](src) images, - and 1. lists, > blockquotes and fenced code blocks for pre. Characters that Markdown would treat as formatting, such as * and _ in plain text, get a backslash in front. Here is a quick example. Feed it a table with a Name and Age header row and one row for Alice, 30, and switch to Markdown. You get a three-line pipe table: the header, a | --- | --- | separator, then | Alice | 30 |. In Text Only the same table comes out as two tab-separated lines that paste straight into a spreadsheet. A few honest limits. Table cells are flattened to one line, so line breaks and lists inside a cell are lost. Text Only and Structured keep link text but drop the URL. Pre blocks keep their exact spacing, but the tool does not guess a language for the fence. It only sees the HTML you paste, so content that a page builds with JavaScript after load won't be there. Your markup is parsed inside your own browser tab and is never uploaded.

Email developers writing plain-text fallbacks, and content engineers moving HTML posts into Markdown-based static sites. The tool runs entirely in your browser, so your data never leaves your device.

02How to use HTML to Text

  1. Choose Text Only, Structured or Markdown with the buttons at the top.
  2. Paste your markup into HTML Input, or load the Simple HTML, Table or Complex example.
  3. Read the result in the Extracted Text panel, which updates as you type.
  4. Switch modes to compare outputs without pasting again.
  5. Click Copy to put the result on your clipboard, or the reset icon to clear the input.

03Worked examples

Input: <h1>Release notes</h1><p>Fixed <b>two</b> bugs.</p><script>alert(1)</script> (Text Only)
Result: Release notes Fixed two bugs.
The script is dropped and the heading and paragraph are split by a blank line.
Input: The same HTML in Markdown mode
Result: # Release notes Fixed **two** bugs.
Heading level and bold text are kept as Markdown syntax.
Input: The same HTML in Structured mode
Result: ====== Release notes Fixed two bugs.
An h1 gets six = signs, an h6 gets one.
Input: <ol><li>Clone</li><li>Build</li></ol> (Text Only)
Result: 1. Clone 2. Build
Ordered lists keep their numbering.
Input: <table><tr><th>Name</th><th>Age</th></tr><tr><td>Alice</td><td>30</td></tr></table> (Markdown)
Result: | Name | Age | | --- | --- | | Alice | 30 |
The first row becomes the header of a GitHub-style pipe table.
Input: <p>Use snake_case, see <a href="https://example.com/a b">docs</a></p> (Markdown)
Result: Use snake\_case, see [docs](https://example.com/a%20b)
The underscore is escaped and the space in the URL is encoded.

04Common use cases

  • Building the plain-text part of a multipart HTML email so clients that block HTML still show a readable message
  • Moving an old WordPress or CMS post into a Hugo, Astro or Docusaurus site as Markdown
  • Stripping navigation, scripts and styles from a scraped article before adding it to a search index or an LLM prompt
  • Pulling an HTML table out of a report as tab-separated text to paste into Google Sheets or Excel
  • Turning a rich-text field from a support ticket export into readable notes for a changelog
  • Checking what a screen reader or text-only crawler gets from a page section by seeing its text without the markup

05Tips

  • For spreadsheet work use Text Only, not Markdown. Cells are joined with real tab characters, so each one lands in its own column when pasted.
  • If you need the URLs from links, switch to Markdown. Text Only and Structured keep only the visible link text.
  • Spaces inside Markdown link targets are encoded as %20 and closing brackets as %29, so links with odd URLs still render.
  • Grab the rendered element with Copy outerHTML in your browser's dev tools when a page builds its content with JavaScript. View Source won't contain it.
  • A br tag becomes a single line break, while p and heading tags get a blank line. Pick the source tags with that in mind if spacing matters.

06Related concepts

HTML parsing, Plain text, Markdown, HTML entities, Web scraping.

Frequently Asked Questions

What is HTML to Text?

HTML to Text is a free, browser-based developer tool on AIDToolStack. Strip HTML tags, extract plain text It requires no installation or sign-up and works entirely in your browser.

Is HTML to Text free to use?

Yes. No sign-up, no fees and no usage cap.

Does HTML to Text store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe