Quick access

Saved in this browser. Sign in to keep it on all your devices.

HTML Entity Encoder/Decoder

Encode and decode HTML special characters. Safe for HTML content, form inputs, and web development.

Common HTML Entities

&&
<&lt;
>&gt;
"&quot;
''
 &nbsp;
©&copy;
®&reg;

Bidirectional

Encode special characters or decode entities back to plain text.

Web Safe

Properly encode HTML to prevent XSS and rendering issues.

Instant Copy

One-click copy encoded or decoded output to clipboard.

2
Modes
8
Common Entities
100%
Free
0
Sign-up
Version 1.1 Updated What's new

Release notes

  1. v1.1 Latest
    • Added an in-depth guide below the tool, written from what the tool actually does.
    • Named and hex entities are now decoded together in one pass.

About the HTML Entity Encoder/Decoder

HTML entities are codes that stand for characters, such as &copy; for © or &#8364; for €. They let you write any character in HTML, even ones that are hard to type.

How to use it

  1. 1 Paste your text or entity-encoded HTML.
  2. 2 Choose Encode or Decode.
  3. 3 Copy the converted text.

Frequently asked questions

What is the difference between named and numeric entities?

Named entities use a word, like &euro;. Numeric entities use the Unicode code point, like &#8364; or &#x20AC;. Both show the same character.

What does &nbsp; do?

&nbsp; is a non-breaking space. It looks like a normal space but stops the browser from wrapping a line at that point.

Do I still need entities with UTF-8 pages?

Mostly not. With UTF-8 you can type characters like é directly. You only must escape &, <, >, and quotes.

Which characters must be escaped

Only a few characters can be misread as markup. An ampersand and a less-than sign need escaping in ordinary text, and a quote needs it inside an attribute that uses the same kind of quote.

On a UTF-8 page you can type é or € directly. Entities remain useful for invisible characters such as the non-breaking space, and for systems that only accept plain ASCII, such as some email templates and older databases.

What Encode and Decode do here

Encode writes a named entity for common characters such as &amp;, &lt;, &copy; and &euro;. Every other non-ASCII character becomes a decimal code, and emoji are handled as a whole, so 😀 becomes &#128512;.

Decode understands decimal codes, hex codes and the common named entities. An entity it does not recognize is left unchanged instead of being removed. Once you press a button, typing in the input box keeps using that mode.

Input:   <a title="Tom & Jerry">© 2026</a>
Encoded: &lt;a title=&quot;Tom &amp; Jerry&quot;&gt;&copy; 2026&lt;/a&gt;

Spotting double encoding

If a page literally shows &amp;amp; or &lt;b&gt;, the text was escaped twice, often once by a form and again by a template. Decoding works in a single pass, so &amp;lt; becomes &lt; and stops there. Press Decode again on the output if you need to peel off a second layer.

Escaping is tied to context

Entities protect text placed inside HTML. They do not make a value safe inside a script block, a style rule or a URL, each of which has its own escaping rules. In a real application, let your template engine escape output, as Blade’s double braces or React’s JSX do, rather than encoding by hand.