Text

HTML to Text Converter

Remove HTML tags and extract clean plain text with optional formatting controls.

Loading interactive tool…

Embed this tool on your site

About this tool

HTML markup is essential for web rendering but becomes unwanted noise the moment you need plain, readable text. Whether you are cleaning up content exported from a CMS that stores HTML in a database column, removing formatting before pasting into a plain-text field, or preparing web content for text analysis, Strip HTML Tags removes every tag and returns the text. Paste your HTML and click Strip HTML. Decode HTML entities (on by default) turns &amp;, &lt; and numeric entities into the characters they stand for, and Collapse whitespace squeezes leftover runs of spaces and blank lines. Line breaks already in your source are kept, but tags are not turned into line breaks: the Preserve block line breaks option currently has no effect, so blocks written on one line run together. The contents of <script> and <style> blocks and the <title> text stay in the output, so remove those first if you paste a full page. Copy the result, or use Swap to input for another pass. Everything runs in your browser.

Why use it

  • Removes Every Tag: Opening, closing and self-closing tags — with their attributes and inline styles — are stripped, leaving only the text between them.

  • Keeps Source Line Breaks: Line breaks already present in your HTML source survive stripping, so markup written one element per line keeps its structure.

  • HTML Entity Decoding: Decode &, &nbsp;, <, >, and numeric entities to plain characters in the same pass.

  • Whitespace Collapse: Removes the chains of spaces that tags leave behind, producing clean single-spaced output.

  • Swap to Input for Another Pass: Feed the result straight back in to strip escaped markup such as &lt;b&gt; that decoding turned into real tags.

  • No Server Required: Runs entirely in the browser — confidential CMS content never leaves your machine.

How to use

  1. Paste your HTML markup or HTML-containing text into the Input HTML box.
  2. Leave Decode HTML entities ticked to convert &amp;, &lt;, &nbsp; and numeric entities to characters.
  3. Leave Collapse whitespace ticked to squeeze extra spaces and blank lines left by stripped tags.
  4. Click Strip HTML to produce the plain text output.
  5. Click Copy to copy the result, or Swap to input to run another pass.

When it helps

  • When copying article text from a web page that pastes with HTML tags into your editor.
  • When cleaning CMS-exported content stored as HTML for import into a plain-text system.
  • When preparing web content for input into an NLP pipeline that expects raw plain text.
  • When stripping email HTML to read or process the plain-text message body.
  • When removing formatting tags from a Word-to-HTML conversion before pasting into a new document.
  • When extracting readable text from an HTML template for translation or content review.

Examples

Simple paragraph stripping

Input
<p>Hello <strong>world</strong>!</p>
Expected result

Hello world!

Heading and paragraph on separate lines

Input
<h1>My Article</h1>
<p>Tom &amp; Jerry is a classic.</p>
Expected result
My Article
Tom & Jerry is a classic.

Blocks on one line run together

Input
<div><p>Dear User,</p><p>Your account is ready.</p></div>
Expected result

Dear User,Your account is ready.

Tips

  • Keep Decode HTML entities and Collapse whitespace ticked for the cleanest output from CMS-exported HTML.
  • If your HTML is all on one line, run it through HTML Formatter first so each block sits on its own line — those line breaks are kept when the tags are stripped.
  • Run the output through Text Cleaner afterward to straighten smart quotes and remove leftover indentation.
  • If you need the alt text from images, use Find & Replace to extract alt='...' values first, then strip the HTML.
  • For NLP or machine learning text prep, also use the Unicode Normalizer after stripping to normalize any accented characters.

Frequently Asked Questions

Does it remove inline CSS and JavaScript as well as HTML tags?
Inline style attributes are removed together with their tags. The contents of <script> and <style> blocks are not removed — the tags go, but the code inside stays as plain text. Delete those blocks before pasting if you only want visible text.
What happens to HTML entities like &nbsp; after stripping?
With 'Decode HTML entities' ticked (the default), &amp; becomes &, &lt; and &gt; become < and >, and &nbsp; becomes a non-breaking space character (U+00A0), which Collapse whitespace does not merge with normal spaces. With the option off, entities stay as typed.
Does it preserve the paragraph structure of the original HTML?
Only through line breaks already in your source. Block tags such as <p>, <div> and <h1> are removed without inserting a line break — the Preserve block line breaks option currently has no effect — so '<h1>Title</h1><p>Text</p>' becomes 'TitleText'. Put each block on its own line before stripping to keep them apart.
Will it strip tags inside attribute values?
HTML inside attribute values (like alt text or title text) is not extracted — attributes are stripped along with their tags. Only the text nodes between tags are preserved.
Can I use it to strip tags from a full HTML page including <head>?
Yes, but the result holds more than the visible body text: the <title> text and any script or style code stay in the output. Remove the <head>, <script> and <style> sections first for a clean result.
Does it handle malformed or unclosed HTML tags?
The tool uses a regex-based approach rather than a DOM parser, so it handles many malformed patterns gracefully. Complex nested malformation may leave occasional artifacts — review the output for edge cases.
What is the difference between this and Strip Markdown?
Strip HTML removes HTML tags and their syntax. Strip Markdown removes Markdown formatting symbols like **, *, #, and []. Use the right tool for the markup language your input uses.
Does stripping tags remove image alt text?
By default, alt text in <img> tags is lost along with the tag. If preserving alt text is important, extract it manually using Find & Replace with a regex pattern before stripping.

Explore the category

Glossary

HTML tag
A markup element in HTML consisting of an element name in angle brackets, such as <p> or <div>, used to define the structure and presentation of web content.
HTML entity
A code sequence starting with & and ending with ; representing a special character in HTML, such as & for &, &nbsp; for non-breaking space, and < for <.
Block element
An HTML element that creates a block of content that starts on a new line, such as <p>, <div>, <h1>–<h6>, and <ul>. Contrasted with inline elements like <span> and <a>.
DOM (Document Object Model)
A tree-structured representation of an HTML document that browsers use to render pages and JavaScript uses to manipulate content.
Plain text
Text containing only printable characters and standard whitespace, with no markup, formatting codes, or binary data.
Inline style
CSS styles applied directly to an HTML element via the style attribute, such as <p style='color:red'>. Inline styles are stripped along with their tags.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities