Strip HTML tags

Turn HTML into readable text with paragraph breaks, decoded entities and no script/style content, or choose literal tag removal. This is text extraction, not HTML sanitization.

Input: TextResult: Text

Text input

Examples

Read an inline release announcement

Input

<p>Deploy <strong>v2.4</strong> to <em>staging</em>.</p>

Expected answer

Deploy v2.4 to staging.
Text extraction
Readable text
Keep two release notes separate

Input

<p>Backup complete.</p><p>Deploy ready.</p>

Expected answer

Backup complete.

Deploy ready.
Text extraction
Readable text
Decode entities once, including a literal tag

Input

<p>Fish &amp; chips: &euro;5. &#x1F41F; &lt;b&gt; &amp;lt;</p>

Expected answer

Fish & chips: €5. 🐟 <b> &lt;
Text extraction
Readable text
Read article text without JavaScript or CSS

Input

<style>p{color:red}</style><p>Before</p><script>demo()</script><p>After</p>

Expected answer

Before

After
Text extraction
Readable text
Keep a Python snippet indented

Input

<p>Example:</p><pre>if ready:
    deploy()
    notify()</pre>

Expected answer

Example:

if ready:
    deploy()
    notify()
Text extraction
Readable text

Related tools

Browse code tidy tools