Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Developer Utilities

HTML to Plain Text

Convert an HTML fragment or document to plain text with a pure string tokenizer (no DOM). Script and style contents are dropped, block elements become line breaks, list items get a dash, and HTML entities are decoded.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

A tokenizer, not a browser

The conversion is one ordered pass of string rules: HTML comments go first, then script and style blocks with their contents, then the optional link and image rewrites, then structural tags become line breaks, and only afterwards are entities decoded. Nothing is rendered, no DOM is created and no script in the input ever executes, so the result is the same in a worker or a test as in the page.

How layout survives the trip

Structural tags map to whitespace rather than being dropped: <br> becomes a newline, each <li> starts a line prefixed with "- ", and closing p, div, h1–h6 and tr tags become a blank line. Runs of spaces and tabs collapse to one, lines are trimmed, and three or more blank lines shrink to one.

The two optional keepers

By default links contribute only their visible text and images disappear. Turning on keep link URLs rewrites <a href> as "link text (https://…)", and keep image alt text turns <img alt="…"> into "[alt text]". An image with an empty or missing alt still vanishes even with that option on.

What it will not decode

Numeric entities decode for any code point up to U+10FFFF, but named entities come from a fixed list, so an unrecognised name is left as written. Input over 500,000 characters is rejected rather than truncated, and an unclosed tag simply falls through the final strip step. The whole pass is local string work with no network request and no script execution.

Questions

Does it use the browser DOM parser?

No. It is a small pure-JS tokenizer, so it runs the same in a Web Worker or a test and never executes the HTML.

Which entities are decoded?

A common named set (&amp; &lt; &nbsp; &copy; &mdash; …) plus every numeric entity, both decimal (&#169;) and hex (&#xA9;).

What happens to <script> and <style>?

Their contents are removed entirely before any text is extracted.

See category