Developer Tools

HTML Entities Encoder & Decoder

Encode text to HTML entities or decode entities back to text, live in your browser: 4 encode levels, named, decimal and hex decoding, a clickable entity reference table, copy and download, and warnings for unknown entities.

Also turns common symbols into readable names like © and €.

Your result will appear here.

Input: 0 characters

Common entities (click to insert)

Click a row to insert the character into the input.

CharacterEntityName
&&ampersand
<&lt;less than
>&gt;greater than
"&quot;double quote
'&apos;apostrophe
 &nbsp;non-breaking space
©&copy;copyright
®&reg;registered
™&trade;trademark
€&euro;euro
£&pound;pound
¥&yen;yen
¢&cent;cent
°&deg;degree
±&plusmn;plus minus
×&times;multiplication
÷&divide;division
–&ndash;en dash
—&mdash;em dash
‘&lsquo;left single quote
’&rsquo;right single quote
“&ldquo;left double quote
”&rdquo;right double quote
…&hellip;ellipsis
•&bull;bullet
§&sect;section
&para;paragraph
†&dagger;dagger
‡&Dagger;double dagger
«&laquo;left guillemet
»&raquo;right guillemet
¡&iexcl;inverted exclamation
¿&iquest;inverted question
½&frac12;one half
¼&frac14;one quarter
¾&frac34;three quarters
←&larr;left arrow
→&rarr;right arrow
↑&uarr;up arrow
↓&darr;down arrow
∞&infin;infinity
≠&ne;not equal
≤&le;less or equal
≥&ge;greater or equal
√&radic;square root
∑&sum;summation
π&pi;pi
α&alpha;alpha
Ω&Omega;omega
♥&hearts;hearts
★&star;star

🔒 Privacy: conversion runs locally in your browser. Encoding is not encryption: anyone can decode entities, so never use it to hide a password or API key. Encoding user text before it reaches HTML is a core XSS defense.

More developer tools

How this calculator works

An HTML entity is a short code that stands for a character, written as an ampersand, a name or number, and a semicolon, like &amp; for an ampersand, &copy; for the copyright sign, or &#169; for the same sign as a decimal number. Browsers read these codes and show the real character, which is why entities exist: they let you put characters like < and > into a page without the browser mistaking them for tags. This tool converts in both directions, live as you type, with four encode levels and full decoding of named, decimal and hex entities.

The four encode levels cover different jobs. Minimal encodes only the five characters that break HTML (& < > " '), which is what you want when escaping user text before it reaches a page. Named also turns common non-ASCII characters into readable names like &euro; or &mdash;, which keeps source code easy to read. Numeric writes every non-ASCII character as a decimal code like &#8364;, which is the safest choice when the file encoding is uncertain. All non-ASCII prefers a named entity where one exists and falls back to decimal otherwise, so you get the most readable output that still covers every character. On the decode side, the tool understands named, decimal (&#169;) and hex (&#xA9;) entities in mixed content, and it flags unknown names and out-of-range numbers instead of silently dropping them.

Encoding is also a core defense against cross-site scripting (XSS). When user text is printed into HTML without encoding, an attacker can inject a <script> tag that runs in other visitors browsers, but if < becomes &lt; first, the browser shows the text instead of running it, which is why every template engine escapes output by default. This tool is the manual version of that same step, handy for email templates, CMS content and test data. One warning: never encode twice. Encoding &amp; again gives &amp;amp;, which renders as the literal text &amp; on the page, and the tool detects that double-encoding and tells you. Everything runs in your browser, nothing is uploaded, and there is no account.

Frequently asked questions

What is an HTML entity?
An HTML entity is a code that represents a character, written as an ampersand, a name or number, and a semicolon. For example, &amp; means an ampersand, &lt; means a less-than sign, &copy; means the copyright sign, and &#169; is the same sign written as a decimal number. Browsers display the real character when they read the code.
How do I encode text to HTML entities?
Paste your text, pick an encode level, and copy the result. Minimal encodes only the five characters that break HTML (& < > " '), Named also converts common symbols to readable names like &euro;, Numeric writes every non-ASCII character as a decimal code like &#8364;, and All non-ASCII prefers a name where one exists and falls back to decimal.
How do I decode HTML entities back to text?
Switch to Decode mode and paste the encoded text. The tool understands named entities (&copy;), decimal entities (&#169;) and hex entities (&#xA9;), including mixed content where entities sit next to plain text. Unknown names and invalid numbers are flagged in a warning instead of being silently dropped.
What is the difference between named, decimal and hex entities?
Named entities use a word, like &copy; or &euro;, and are the easiest to read. Decimal entities use the character code in base 10, like &#169;. Hex entities use the same code in base 16, like &#xA9;. All three mean the same character to a browser, so the choice is about readability and what your toolchain produces.
What is double-encoding and why should I avoid it?
Double-encoding means encoding text that is already encoded. Encoding &amp; a second time gives &amp;amp;, which a browser shows as the literal text &amp; instead of an ampersand. It happens when text passes through two escaping steps, for example a CMS that escapes on save and a template that escapes on display. This tool detects double-encoded input and warns you before you encode again.
Is encoding HTML the same as escaping for XSS protection?
Encoding the five special characters (& < > " ') is the core of output escaping, which stops injected markup from running as code. It is a necessary layer, but it is not a complete XSS strategy on its own: always also validate input, use a Content Security Policy, and let your framework escape output by default instead of relying on manual encoding.
Disclaimer: Results are estimates for planning purposes only and are not financial advice. Actual loan terms, taxes and investment returns vary. Consult a qualified professional before making financial decisions.