ToolFox

HTML Entity Converter

Encode special characters into HTML entities, or decode entities back into plain text.

Result

How it works

Encoding replaces the five characters that have special meaning in HTML — & < > " ' — with their named entities (&amp; &lt; &gt; &quot; &#39;), so the text can be embedded safely inside HTML without being interpreted as markup. Decoding uses the browser's own HTML parser to turn any named or numeric entity back into the character it represents, the same way a browser reads a web page.

Example

Encoding <a href="x"> produces &lt;a href=&quot;x&quot;&gt; — safe to drop into an HTML template. Decoding &lt;b&gt;&amp;amp;&lt;/b&gt; reveals the original <b>&amp;</b>, including an entity nested inside other entities.

Frequently asked questions

Why do I need to encode these characters?

Because <, > and & have special meaning in HTML — an un-encoded < can start a tag, breaking your page or enabling injection. Encoding makes the text safe to embed literally.

Does decoding handle numeric entities too?

Yes — both named entities like &amp; and numeric ones like &#39; or &#x27; are decoded correctly, since decoding uses the browser's real HTML parser.

Is this the same as URL encoding?

No — HTML entities protect text embedded in HTML markup; URL encoding (percent-encoding) protects text embedded in a URL. Use the right one for where the text is going.

Is my text uploaded anywhere?

No — both encoding and decoding run entirely in your browser.

Related tools