Search tools

Find a tool by name or what it does.

HTML Entity Encoder

Encode text to HTML entities and decode entities back to plain text, both directions.

Direction

Entity format

Accented letters, symbols, and emoji are converted along with the five markup characters.

Converted live as you type. Everything runs in your browser. Nothing is uploaded.

Common entities

CharacterNamedNumeric
<&lt;&#60;
>&gt;&#62;
&&amp;&#38;
"&quot;&#34;
'&apos;&#39;
space&nbsp;&#160;
©&copy;&#169;
®&reg;&#174;
&trade;&#8482;
&mdash;&#8212;
&euro;&#8364;
&hellip;&#8230;

Decoding recognises every named entity plus numeric decimal and hexadecimal references. Unknown or incomplete entities are left exactly as written.

How to encode and decode HTML entities online

  1. Choose a direction

    Select Encode to turn characters into HTML entities, or Decode to turn entities back into the characters they represent.

  2. Set the entity format

    When encoding, pick named, decimal, or hexadecimal output, and toggle whether accented letters, symbols, and emoji are converted too.

  3. Enter your text

    Type or paste into the input and the result updates immediately, with no submit step.

  4. Copy the output

    Use Copy to clipboard to move the encoded or decoded text wherever you need it.

Why use this tool

Named, decimal, and hex output

Encode to readable named entities like &copy;, to decimal references like &#169;, or to hexadecimal references like &#xA9;. Switch formats and the whole result re-renders at once.

Full named entity table

The complete set of standard named entities is built in, covering Latin letters, punctuation, currency, arrows, Greek, and math symbols, so decoding recognises names like &mdash;, &euro;, and &alpha;.

Decodes both kinds in one pass

Decoding turns named entities and numeric references, decimal or hexadecimal, back into characters in a single pass, so you never need to know how a string was produced.

Malformed entities left intact

An unknown name, a lone ampersand, or an out-of-range numeric reference is left exactly as written instead of breaking the result, so partial or hand-edited markup decodes predictably.

Non-ASCII characters covered

Encoding operates on full Unicode code points, so accents, symbols, and emoji become their correct entities and come back intact. A toggle limits encoding to the five markup characters when that is all you want.

Runs entirely in your browser

Everything happens on your device; nothing is uploaded, stored, or logged.

About this tool

This HTML entity encoder works in both directions. Encoding always converts the five characters that carry structural meaning in markup, the ampersand, the less-than and greater-than signs, and both quote marks, and optionally converts every other non-ASCII character too. Decoding reverses the process, turning named entities such as &amp; and numeric references such as &#169; or &#xA9; back into the characters they stand for.

Reach for it whenever raw text has to sit safely inside HTML: pasting code samples or user text into a page without the browser reading angle brackets as tags, escaping content for an email template, or cleaning up a fragment where entities and plain characters are mixed. Encoding offers named, decimal, and hexadecimal output, and a toggle keeps accented letters and emoji as-is when only the markup characters need escaping. Decoding accepts all three forms at once and leaves anything it does not recognise untouched, so malformed or hand-edited markup never produces a broken result.

To escape text for a link or query string rather than for HTML, use the URL encode and decode tool. To tidy the surrounding markup after decoding, try the HTML formatter, and to turn characters into programming-language escape codes instead of entities, see unicode escape.

Frequently asked questions

What is an HTML entity?
An HTML entity is a way to write a character using ordinary text so a browser does not misread it. It starts with an ampersand and ends with a semicolon, either as a name like &lt; or as a numeric reference like &#60; (decimal) or &#x3C; (hexadecimal). All three represent the same character.
What is the difference between named and numeric entities?
Named entities such as &copy; are easier to read, while numeric references such as &#169; or &#xA9; work for any character even when no name exists. Encoding lets you choose the style; decoding accepts all of them and converts them back to the same character.
Does it encode accents, symbols, and emoji?
Yes. With the non-ASCII option on, every character above the basic ASCII range is converted to an entity, using its named form when one exists and a numeric reference otherwise. Turn the option off to escape only the five markup characters and leave the rest of the text as typed.
What happens with malformed or unknown entities when decoding?
Anything the decoder does not recognise, such as an unknown name, a stray ampersand, or a numeric reference outside the valid range, is left exactly as written instead of causing an error. This makes it safe to run on partial or hand-edited markup.
Is my text uploaded anywhere?
No. Encoding and decoding run entirely in your browser. Your text never leaves your device, is never sent to a server, and is not stored or logged.

Related tools