Skip to content

HTML Entity Encoder

Encode text to HTML entities (reserved characters, all special characters or all non-ASCII) or decode entities, with a searchable entity table.

HTML Entity Encoder

Plain text66 chars
Encoded HTML111 chars

HTML entity reference

CharacterDescriptionNamedNumeric
&Ampersand&&
<Less than&lt;&#60;
>Greater than&gt;&#62;
"Double quote&quot;&#34;
'Apostrophe&apos;&#39;
[ ]Non-breaking space&nbsp;&#160;
©Copyright&copy;&#169;
®Registered&reg;&#174;
™Trademark&trade;&#8482;
—Em dash&mdash;&#8212;
–En dash&ndash;&#8211;
…Horizontal ellipsis&hellip;&#8230;
«Left double angle quote&laquo;&#171;
»Right double angle quote&raquo;&#187;
•Bullet&bull;&#8226;
·Middle dot&middot;&#183;
°Degree sign&deg;&#176;
±Plus-minus&plusmn;&#177;
×Multiplication&times;&#215;
÷Division&divide;&#247;
µMicro sign&micro;&#181;
Paragraph sign&para;&#182;
§Section sign&sect;&#167;
€Euro sign&euro;&#8364;
£Pound sign&pound;&#163;
¥Yen sign&yen;&#165;
¢Cent sign&cent;&#162;
‘Left single quote&lsquo;&#8216;
’Right single quote&rsquo;&#8217;
“Left double quote&ldquo;&#8220;
”Right double quote&rdquo;&#8221;
←Left arrow&larr;&#8592;
→Right arrow&rarr;&#8594;
↑Up arrow&uarr;&#8593;
↓Down arrow&darr;&#8595;
♥Heart suit&hearts;&#9829;
♦Diamond suit&diams;&#9830;
♣Club suit&clubs;&#9827;
♠Spade suit&spades;&#9824;

Updated . Provided as is. Check the output before you rely on it in production.

How to use HTML Entity Encoder

  1. 1

    Choose Encode or Decode

    Encode turns special characters into HTML entities; Decode turns entities back into readable text.

  2. 2

    Paste text or entities

    Paste text with characters such as ©, ™ or <, or an HTML string containing entities such as &lt;, &amp; or &nbsp;.

  3. 3

    Look up an entity

    Search the reference table for the named and numeric form of common characters, from arrows to currency symbols.

  4. 4

    Copy the result

    The output updates as you type. Copy it into HTML, email templates or anywhere user input must be escaped.

Questions and answers

What is HTML Entity Encoder?
HTML entities are named or numeric codes, written between an ampersand and a semicolon, that stand in for characters that are reserved in HTML or hard to type. This tool encodes at three levels (reserved only, all special or all non-ASCII), decodes entities back to text and has a searchable entity table.
When should I use HTML entities?
HTML entities are needed when displaying reserved characters like <, >, &, and quotes in web pages. They prevent browsers from interpreting these characters as HTML markup, which also helps prevent XSS vulnerabilities.

Use it as an API

HTML Entity Encoder is also callable as a free HTTP JSON API at https://aidevhub.io/api/html-entity-encoder/ — GET with query parameters or POST with a JSON body, no authentication, CORS enabled, fair use (abusive traffic is throttled at the edge; there is no per-request quota header). Responses return { ok, tool, result, meta }.

curl -s "https://aidevhub.io/api/html-entity-encoder/?input=%3Ch1%3EHello%20%26%20welcome%3C%2Fh1%3E&mode=encode"

Machine-readable contract: /api/tool/html-entities.json All API endpoints: /agents/ LLM site index: /llms.txt

For AI agents: how to call this tool

Machine-readable contract, endpoints and examples. Humans can ignore this section.

Best Path For Builders

Dedicated API endpoint

Deterministic outputs, machine-safe contracts, and production-ready examples.

Dedicated API

https://aidevhub.io/api/html-entity-encoder/

OpenAPI: https://aidevhub.io/api/openapi.yaml

GET /api/html-entity-encoder/ GET html-entity-encoder
POST /api/html-entity-encoder/ POST html-entity-encoder