移除 HTML 标签

将 HTML 转为保留段落、解码实体且排除脚本和样式的文本;也可仅删除标签。此工具不用于安全过滤 HTML。

输入: 文本结果: 文本

文本输入

案例

行内发布公告

输入

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

Expected answer

Deploy v2.4 to staging.
文本 extraction
Readable text
保留段落边界

输入

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

Expected answer

Backup complete.

Deploy ready.
文本 extraction
Readable text
实体只解码一次

输入

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

Expected answer

Fish & chips: €5. 🐟 <b> &lt;
文本 extraction
Readable text
排除脚本与样式

输入

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

Expected answer

Before

After
文本 extraction
Readable text
保留代码缩进

输入

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

Expected answer

Example:

if ready:
    deploy()
    notify()
文本 extraction
Readable text

相关工具

代码整理

操作参考

查看原始技术文档 (English)