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 `&` and `©` 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.
Hello, world! This is a link & 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
- Paste an HTML snippet in the input.
- Toggle the options to taste — keep block-level line breaks, collapse runs of whitespace, decode entities.
- 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
URL Slug Generator
Turn any text into a clean URL slug — strip accents, choose a separator, set a max length.
Markdown Table Generator
Paste CSV, TSV, or pipe-delimited data and get a properly aligned GitHub-flavored Markdown table.
Text Diff Viewer
Compare two pieces of text and see line-by-line or word-by-word additions and removals.
Lorem Ipsum Generator
Generate placeholder text by paragraphs, sentences, or words.
Case Converter
Convert text between UPPER, lower, Title, camelCase, snake_case and more.
Character & Word Counter
Count characters, words, sentences, lines, and bytes in real time.