HTML Encoder/Decoder

Online HTML Entity Encoding and Decoding Tool, featuring smart automatic detection, three encoding formats, file upload and download, and a reference table of over 200 HTML entities

Input Text

Output Result

🔌 Quick Insert HTML Entity

👁️ Visual Preview — How encoded output renders in browser

Collapse ▲
After encoding input text, the actual rendering will appear here
Input Chars:0
Output Chars:0
Time:0 ms
Change:+0%

📚 HTML Entity Reference (Click to Expand)

What is HTML entity encoding/decoding?

HTML Entity is a text string that begins with & and ends with ;, used to display reserved characters in HTML documents (such as <, >), or to represent characters that are difficult to type on a keyboard (such as ©, ).

Encode: Replaces special characters in HTML with their corresponding HTML entities, preventing the browser from parsing them as HTML tags.

Decode: Converts HTML entities back to their original characters, making it easier to view and edit the actual content.

6 Characters That Must Be Escaped

CharacterNamed EntityDecimal EntityHex EntityDescription
&&amp;&#38;&#x26;Ampersand
<&lt;&#60;&#x3C;Less than
>&gt;&#62;&#x3E;Greater than
"&quot;&#34;&#x22;Double quote
'&apos;&#39;&#x27;Single quote

Common Use Cases

  • XSS Prevention — Encode <> in user input to safely embed into HTML pages
  • Display Code on Web Pages — Show HTML code snippets without the browser rendering them as actual elements
  • Secure Data Transmission — Encode text containing special characters before storage or transmission
  • Template Development — Encode dynamic HTML content when embedding it in templates

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏