HTML to Plain Text
Strip HTML tags from a snippet and get just the text — keeps block-level newlines, drops <script> and <style>, decodes entities.
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.
About this tool
ShowHide
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.
Discarding a script tag along with its contents is the part a naive strip gets wrong. Removing angle-bracket pairs with a pattern leaves the JavaScript behind as apparent prose, so the output contains variable names and function bodies that read as gibberish in the middle of an article. The same applies to CSS, and to the contents of a <head> in a full page.
Block tags becoming newlines is what keeps the result readable. HTML collapses whitespace and relies on the tags for structure, so dropping them without substitution runs every paragraph, list item and heading together into one line. That is why stripping tags in a spreadsheet formula produces a wall of text where a document had sections.
Entities have to be decoded or the output is not plain text. & is an ampersand, is a space that is not a space, and a numeric entity like ’ is a curly apostrophe. Leaving them as-is produces something that looks like text and fails any downstream comparison, and decoding to U+00A0 rather than to a space is a distinction worth knowing when the result feeds a parser.
What this is not is a sanitiser. Stripping tags to make user input safe to display is a well-known way to get it wrong: the safe operation is escaping on output, which turns < into < and leaves the text intact, not removing things that look like markup. This tool is for text you already trust and want to read.
The single-pass parser is why it handles a large paste without building a document tree, and also why deeply malformed input is best checked rather than assumed.
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.
Is stripping tags enough to make untrusted HTML safe?
For displaying it as text, yes — text cannot execute. It is not a sanitiser, though: sanitising means keeping HTML while removing what is dangerous, which is a much harder problem and needs a library that understands the parsing quirks attackers use. If you intend to render the markup rather than read it, do not strip it, sanitise it.
Why does the text come out with words run together or oddly spaced?
Because HTML whitespace is not layout. Newlines and indentation in the source collapse when rendered, while a visual line break can come from a block element that contains no whitespace at all — so removing tags leaves either too much space or none. Turning on break preservation reconstructs the block boundaries as newlines, which is closer to what the page looked like.
Related tools
Markdown → Plain Text
Strip all Markdown formatting and keep readable plain text — useful for previews, summaries, email, character counts.
Convert
Image EXIF Stripper
Drop a photo and download a clean copy with EXIF, GPS, and other metadata removed — all in your browser, no upload.
Image
Remove Line Breaks
Join wrapped lines back into clean, flowing text — strip the hard line breaks you get when copying from PDFs or emails, while keeping real paragraphs.
Text
Unicode Normalizer (NFC, NFD, NFKC, NFKD)
Normalize text to NFC, NFD, NFKC or NFKD, optionally strip diacritics, and compare codepoint and byte counts across all four forms.
Text
Markdown → HTML Converter
Convert Markdown to clean HTML — copy the source for emails, CMS pages, or anywhere a rendered preview isn't enough.
Text
Case Converter
Convert text between UPPER, lower, Title, camelCase, snake_case and more.
Text