About HTML Entity Encoder
HTML entity encoder/decoder escapes <>"' to entities (<&) and back. Prevents XSS, safely displays HTML source. Supports named and numeric entities. Real-time preview, fully offline.
How to Use
- Paste HTML or text
- Choose encode (to entity) or decode (back)
- Pick named or numeric format
- Copy result for safe embedding
Frequently Asked Questions
- Why escape HTML special chars?
- Prevents XSS. Unescaped user < is treated as HTML tag start and can be exploited by malicious JS.
- Named vs numeric entities?
- Named (&) readable but limited set; numeric (&) supports all Unicode. Numeric has better compatibility.
- HTML5 vs HTML4 entities?
- HTML5 adds new entities like ' (unsupported in HTML4). For max compatibility, use ' instead.