HTML 编码/解码
HTML 实体编码与解码
🔒 100% client-side — your data never leaves this page输入
Encoded
Encoded output
Previewlive render
About this tool
将 HTML 特殊字符转换为对应的 HTML 实体,确保在网页中安全显示;或将 HTML 实体解码回可读字符。
Frequently Asked Questions
Why do I need to encode HTML?
If you display user-submitted text directly in HTML, characters like < and > will be interpreted as tags, breaking your layout or creating XSS security vulnerabilities. Encoding converts them to safe entities.
What are the most common HTML entities?
The most important are: & for &, < for <, > for >, " for double quotes, and ' for single quotes.
Can I safely paste encoded HTML into a page?
Yes. HTML entities are escaped for safe display. You can also preview decoded content to verify output before use.