I Help You

HTML Entity Converter

Convert special characters to named HTML entities (&, <, ©) and back. Free, and it runs entirely in your browser — nothing you enter is uploaded.

How to use the HTML Entity Converter

1. Choose Encode to convert special characters to HTML entities, or Decode to reverse it.

2. Paste your HTML or text into the left panel — output appears instantly on the right.

3. The encoder handles 40+ named entities including symbols, currency, math, and Greek letters.

What is it?

HTML entities are special codes that represent characters which have special meaning in HTML or are difficult to type. The five most critical are &amp; (&), &lt; (<), &gt; (>), &quot; ("), and &apos; ('). Using these instead of the raw characters ensures browsers interpret them as literal text rather than HTML syntax — preventing broken markup and XSS injection vulnerabilities.

Named entities like &copy; (©), &euro; (€), &mdash; (—), and &hellip; (…) are useful for inserting special characters without relying on keyboard input or copy-pasting Unicode. Numeric entities (&#169; or &#xA9; for ©) work for any Unicode character. The decoder handles all three formats: named, decimal numeric, and hex numeric.

Example

HTML with special characters (Encode)
<p>Price: 5 < 10 & "sale" applies</p>
↓
Encoded HTML Entities
&lt;p&gt;Price: 5 &lt; 10 &amp; &quot;sale&quot; applies&lt;/p&gt;

Always encode user-supplied content before rendering into HTML. This prevents XSS injection attacks.

Benefits

Convert © ® ™ and symbols to readable named HTML entities

Named entities like &copy; and &trade; are more portable and readable than raw Unicode or numeric equivalents in HTML source.

Ensure special characters display correctly across all browsers

HTML entities render consistently where raw Unicode characters might be misinterpreted by older parsers or mail clients.

Prepare content for strict XML environments

< > & " ' must be entity-encoded in XML to avoid parse failures — the converter handles all five required XML characters.

Decode named entities from third-party HTML before processing

Convert &nbsp;, &mdash;, &ldquo;, and other named entities back to plain Unicode characters for text manipulation.

Frequently asked questions

Why must I encode & < > " ' in HTML?

These five characters have special meaning in HTML: & starts entities, < and > delimit tags, " and ' delimit attribute values. If you use them as literal text without encoding, the browser may misinterpret your HTML and either break the layout or create a security vulnerability (XSS).

What are numeric entities?

Numeric entities represent any Unicode character by its code point. Decimal format: &#169; (©). Hex format: &#xA9; (©). The decoder handles both formats. Numeric entities are useful for characters that don't have a named entity, like rare symbols or emoji.

Does encoding affect spaces?

Regular spaces are not encoded. Only non-breaking spaces ( ) are encoded as &nbsp;. If you need to preserve multiple consecutive spaces in HTML output, use &nbsp; for the additional spaces, since HTML normally collapses whitespace runs to a single space.