HTML Entity Encoder / Decoder

Convert special characters to HTML entities and back. Named entities, numeric entities, live rendered preview. Fully private, no server.

Encode mode:
Input
Encoded Output
Rendered Preview (decoded output)

When to use HTML entities

HTML entities are required whenever you need to display characters that have special meaning in HTML. The five essential ones are &amp; (&), &lt; (<), &gt; (>), &quot; ("), and &apos; (').

Without encoding, a < character in content will be interpreted as the start of an HTML tag, breaking your markup. Encoding is critical when rendering user-generated content to prevent cross-site scripting (XSS) attacks.

Named entities are more readable (&copy; for ©), while numeric entities work for any Unicode character regardless of browser support for named versions.