HTML 实体编码/解码 — Uttir
Skip to main content

HTML 实体编码/解码

将特殊字符编码为 HTML 实体(如 & < > 和引号),或将命名、十进制、十六进制实体解码回文本。

HTML 实体编码/解码 — HTML reserves a handful of characters that have special meaning in markup: &, <, >, ", and '. When you want those characters to appear as text inside an HTML document, you replace them with entities like &amp;, &lt;, and &quot;.

All conversion happens locally in your browser. No text leaves your device.

Was HTML 实体编码/解码 useful?

HTML 实体编码/解码是什么?

HTML reserves a handful of characters that have special meaning in markup: &, <, >, ", and '. When you want those characters to appear as text inside an HTML document, you replace them with entities like &amp;, &lt;, and &quot;.

This tool encodes plain text to entities (escaping only the reserved characters by default, or every non-ASCII character in "all" mode) and decodes any combination of named (&copy;), decimal (&#169;), and hex (&#xA9;) entities back to the characters they represent.

使用方法

  1. Encode or decode

    Switch the mode with the toggle at the top of the page.

  2. Paste your text

    Type or paste into the input box. Output updates as you type.

  3. Copy the result

    Use the Copy button to put the converted text on your clipboard.

示例

Encode a tag

Convert <div> to its escaped form.

结果: &lt;div&gt;

Decode a named entity

&copy; 2024 — Uttir → © 2024 — Uttir

结果: © 2024 — Uttir

常见问题

相关工具

Last reviewed: 2026-11-21