Web & HTML

HTML Encoder & Decoder

Encode special characters to HTML entities (&, <, >) or decode HTML entities back to plain text. Live updates as you type.

Free Client-Side No Sign-Up Nothing Stored
Input
Output

What This Tool Does

Converts text between plain characters and HTML entities. Encode minimal escapes only the five characters that must be encoded in HTML (&, <, >, ", '). Encode all additionally converts any non-ASCII characters to numeric entities for maximum compatibility. Decode reverses any HTML entity encoding back to plain text.

Frequently Asked Questions

What are HTML entities?
HTML entities are special codes used to represent characters that have meaning in HTML or cannot be typed directly. For example, & must be written as &amp; to avoid being interpreted as the start of an entity, and < must be &lt; to avoid being interpreted as a tag.
When do I need to encode HTML?
Encode HTML whenever you are inserting user-supplied content into a web page — this prevents XSS (Cross-Site Scripting) attacks. Also encode when embedding HTML code in a code block for display, or when storing HTML in attributes.
What is the difference between encode all and encode minimal?
Encode minimal only converts the characters that must be escaped in HTML (&, <, >, ", '). Encode all additionally converts extended characters like accented letters, curly quotes, and symbols to their numeric entity equivalents for maximum compatibility.