HTML Entity Encoder & Decoder

Encode HTML special characters to entities or decode entities back to characters. Choose between encoding all characters or only the special ones — everything runs in your browser.

Encode & decode HTML entities

Type HTML in the top box or encoded entities in the bottom box.

Encoding mode:

What are HTML entities?

HTML entities are special sequences that represent characters which have special meaning in HTML. For example, &lt; represents < and &amp; represents &. Without encoding, browsers would interpret these characters as HTML markup rather than displaying them as text.

Special vs. all encoding

Special-only mode encodes only the five characters that are reserved in HTML: &, <, >, ", and '. Encode all mode converts every character to its numeric entity (&#NNN;), which is useful for obfuscating email addresses or ensuring maximum compatibility with legacy systems.

Common use cases

Use HTML entity encoding when displaying user-generated content to prevent XSS attacks, embedding code snippets in blog posts, or preparing text for HTML email templates. This tool processes everything in your browser — your content is never sent to a server.

More developer tools