AZ Tools

HTML to Plain Text

Text

Walks the input once with a small purpose-built parser — no DOM round-trip — and emits just the text content. `<script>`, `<style>`, `<iframe>`, and friends are discarded along with their contents; block-level tags (`<p>`, `<h1>`, `<li>`, …) become newlines; entities like `&amp;` and `&copy;` are decoded back to their characters. Useful when you've copied rich text from a CMS or an email and need plain content for a markdown file, spreadsheet, or terminal.

Plain text (62 chars)
Hello, world!

This is a link &amp; some text.

One

Two

End.

Tag stripping isn't a sanitizer — never trust hostile HTML, run it through DOMPurify if you'll re-render it.

How to use

  1. Paste an HTML snippet in the input.
  2. Toggle the options to taste — keep block-level line breaks, collapse runs of whitespace, decode entities.
  3. Copy the output. The character count is shown to sanity-check field-length limits.

Frequently asked questions

Why not just use the browser's `innerText`?
`innerText` works but pulls in CSS layout (so it changes based on the document's stylesheet) and refuses to run unless you've already built a DOM. This tool is a small pure parser — it always produces the same output for the same input, regardless of styles.
What's the difference between `preserveBreaks` on and off?
With it on, block-level tags (`<p>`, `<h1>`, `<li>`, `<br>`, …) become a newline in the output. Off, the entire input collapses to a single line — useful if you need the text in a CSV cell or a single-line title.
Is the input sanitized?
All tags are stripped — there's no HTML in the output — but the parser is deliberately minimal. For untrusted HTML that you intend to render, run it through a real sanitizer like DOMPurify rather than relying on a strip step.

Related tools