HTML Entity Encoder

Encode and decode HTML entity characters

Plain Text
HTML Entities

About HTML Entity Encoder

HTML entity encoder/decoder escapes <>"' to entities (&lt;&#38;) and back. Prevents XSS, safely displays HTML source. Supports named and numeric entities. Real-time preview, fully offline.

How to Use

  1. Paste HTML or text
  2. Choose encode (to entity) or decode (back)
  3. Pick named or numeric format
  4. 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 (&amp;) readable but limited set; numeric (&#38;) supports all Unicode. Numeric has better compatibility.
HTML5 vs HTML4 entities?
HTML5 adds new entities like &apos; (unsupported in HTML4). For max compatibility, use &#39; instead.