Answer: In named mode, Tom & Jerry <3 Café becomes Tom & Jerry <3 Café. Every encode mode escapes &, < and >, none of them escapes quotes, and decode only converts references that end in a semicolon. The tool knows 131 entity names; any other character is written as a decimal or hex number.
Encode text to named, decimal, or hex entities — and decode them back
&…; sequence so markup can't misread it: & renders as &, © as ©, and numeric © / © hit the same code point. Paste text below, pick a mode, and the conversion runs instantly in your browser.| Named | Character | Decimal | Hex | Code Point |
|---|---|---|---|---|
| & | & | & | & | 38 |
| < | < | < | < | 60 |
| > | > | > | > | 62 |
| " | " | " | " | 34 |
| ' | ' | ' | ' | 39 |
| |   |   | 160 | |
| © | © | © | © | 169 |
| ® | ® | ® | ® | 174 |
| ™ | ™ | ™ | ™ | 8482 |
| ° | ° | ° | ° | 176 |
| ½ | ½ | ½ | ½ | 189 |
| × | × | × | × | 215 |
| ÷ | ÷ | ÷ | ÷ | 247 |
| ¶ | ¶ | ¶ | ¶ | 182 |
| « | « | « | « | 171 |
| » | » | » | » | 187 |
| ‘ | ‘ | ‘ | ‘ | 8216 |
| ’ | ’ | ’ | ’ | 8217 |
| “ | “ | “ | “ | 8220 |
| ” | ” | ” | ” | 8221 |
| … | … | … | … | 8230 |
| – | – | – | – | 8211 |
| — | — | — | — | 8212 |
| € | € | € | € | 8364 |
| £ | £ | £ | £ | 163 |
| ¥ | ¥ | ¥ | ¥ | 165 |
| ¢ | ¢ | ¢ | ¢ | 162 |
| • | • | • | • | 8226 |
| † | † | † | † | 8224 |
| ← | ← | ← | ← | 8592 |
| → | → | → | → | 8594 |
| ∞ | ∞ | ∞ | ∞ | 8734 |
| α | α | α | α | 945 |
| π | π | π | π | 960 |
| ∑ | ∑ | ∑ | ∑ | 8721 |
| á | á | á | á | 225 |
| é | é | é | é | 233 |
| ñ | ñ | ñ | ñ | 241 |
| ß | ß | ß | ß | 223 |
| å | å | å | å | 229 |
| æ | æ | æ | æ | 230 |
| ç | ç | ç | ç | 231 |
The converter knows 131 names in total, including 12 Greek letters and 22 lowercase accented or special Latin letters, but none for capital accented letters such as É. When you encode, any character outside the list falls back to a numeric form, so nothing is lost.
Entities exist because HTML parses certain characters as structure. An ampersand might begin an entity reference, an angle bracket might open a tag, and plenty of Unicode characters can't be typed at all. The escape hatch is the same in every case: write the character's name or code point between an ampersand and a semicolon.
Named: é → é. Decimal: é → é. Hex: é → é. All three address Unicode code point 233, and each of the 2,125 semicolon-terminated names in the HTML Standard can also be written numerically from its code point or points.
Paste your text, pick a mode, and the output updates as you type. "Encode: named" is the everyday choice — it escapes &, <, > and converts every non-ASCII character to its named entity when the converter knows one. "Encode: & < > only" produces the smallest safe output for HTML text nodes. The decimal and hex modes write every non-ASCII character as a number and keep names only for &, < and >, which is what you want for email templates and code generation. Decode handles all three forms in one pass and leaves unknown sequences untouched.
The input box starts with Tom & Jerry <3 "Café" — €5 — real characters, including é (code point 233), an em dash (8212), and € (8364). In "Encode: named" mode that becomes Tom & Jerry <3 "Café" — €5: the ampersand and angle bracket get escaped first so nothing can be misread as markup, then each non-ASCII character swaps for its name.
Switch to hex mode and the same input comes out with é for é and € for €, skipping names entirely. Emoji have no names in HTML at all, so 😀 encodes as 😀 in named and decimal modes and 😀 in hex mode, while the "& < > only" mode leaves it as typed. Hit decode on any of these outputs and the original text comes back in a single pass.
Two in ordinary text, plus the matching quote inside an attribute. The HTML Standard says text between tags can't contain a literal < or an ambiguous ampersand (an & followed by letters or digits and a semicolon that isn't a real name). A double-quoted attribute value can't contain a literal ", and a single-quoted one can't contain a literal '. Most code escapes all five every time because that's simpler.
| Character | Entity | In text between tags | In an attribute value | This tool (all 4 encode modes) |
|---|---|---|---|---|
& | & | Escape it | Escape it | & |
< | < | Escape it | Optional inside quotes | < |
> | > | Not required; usual practice | Optional inside quotes | > |
" | " | Not needed | Required inside a double-quoted value | Left as " |
' | ' or ' | Not needed | Required inside a single-quoted value | Left as ' |
Here's the gap to know about: this converter never escapes quotes. Paste <a title="5 > 3">it's</a> and every encode mode returns <a title="5 > 3">it's</a>. That's fine for text you're showing between tags. If the result is going inside an attribute value, replace " with " (or ' with ') yourself. And always quote the attribute, because an unquoted value can't hold spaces, quotes, =, <, > or a backtick.
We ran these 7 characters through the page's own encode functions. The fourth mode, "Encode: & < > only", leaves every one of them exactly as typed, so it isn't in the table.
| Character | Code point | Encode: named | Encode: decimal | Encode: hex |
|---|---|---|---|---|
| © | U+00A9 | © | © | © |
| ™ | U+2122 | ™ | ™ | ™ |
| € | U+20AC | € | € | € |
| non-breaking space | U+00A0 | |   |   |
| — (em dash) | U+2014 | — | — | — |
| š | U+0161 | š | š | š |
| 😀 | U+1F600 | 😀 | 😀 | 😀 |
Three things stand out. First, named mode writes ©, ® and ™ in capitals. Those are real names in the HTML Standard and render the same, but if you want ©, change the case by hand. Second, a character missing from the tool's list falls back to decimal even in named mode: HTML defines š for š, but you get š. Third, an emoji gets one reference per code point. The family emoji 👨👩👧 is three people joined by two zero-width joiners, so it becomes five references: 👨‍👩‍👧.
If your page is served as UTF-8, you usually need neither. Type © or é directly and escape only the markup characters, which is what the "& < > only" mode does. Entities earn their place when a file has to stay pure ASCII or when a character is invisible, like a non-breaking space.
| Form | é | € | 😀 | Coverage | Works in XML |
|---|---|---|---|---|---|
| Named | é (8 characters) | € (6) | No name exists | 2,125 names in HTML, 131 in this tool | Only amp, lt, gt, apos and quot |
| Decimal | é (6) | € (7) | 😀 (9) | Any code point | Yes |
| Hex | é (6) | € (8) | 😀 (9) | Any code point | Yes |
Names are easier to read, numbers work everywhere. XML parsers only have to know five names, so in an RSS feed or SVG file is an error unless the file declares it, while   is fine. Size is close to a wash: the 25-character example Crème brûlée €7.50 © 2026 comes out at 55 characters in named mode, 51 in decimal and 52 in hex.
It's stricter, and it knows fewer names. The decoder converts a reference only when it ends in a semicolon, it makes one pass, and it recognises 131 names out of the 2,231 in the HTML Standard (2,125 that end in a semicolon and 106 legacy forms that don't need one). We ran each input below through the page's decode function and compared it with the standard's parsing rules.
| You paste | This tool returns | A browser shows |
|---|---|---|
© (no semicolon) | Unchanged | © in text, with a parse error |
© (no semicolon) | Unchanged | ©, with a parse error |
É | Unchanged (not in the 131) | É |
&amp; | & | & |
€ | The invisible control character U+0080 | € (remapped to U+20AC) |
� | A NUL character (U+0000) | The replacement character U+FFFD |
� (past the end of Unicode) | Unchanged | U+FFFD |
A browser accepts 106 legacy names such as &, <,   and © without the semicolon in text. Inside an attribute it backs off when the next character is = or a letter or digit, which is why a link like ?a=1©=2 survives.
The other trap is the range 128 to 159. Browsers remap 27 of those numbers to the Windows-1252 characters old pages meant, so – displays as an en dash. The tool gives you the raw control character, which is invisible.
No, not by itself. The OWASP Cross Site Scripting Prevention Cheat Sheet recommends HTML entity encoding for one situation, which is untrusted data placed between two tags, and its version converts &, <, >, " and '. Other places need other encoding: attribute encoding for quoted attribute values, percent-encoding for URL parameters (the URL encoder does that), and separate rules for JavaScript and CSS. OWASP also lists contexts where no encoding saves you, such as untrusted data used as a whole event-handler value.
This page formats snippets for display. It isn't a security filter, so in an application rely on your template engine's automatic escaping.
For more, read the HTML entities guide. Related tools: minify HTML, HTML to Markdown and the Base64 encoder.
An HTML entity is a stand-in sequence for a character that would otherwise be parsed as markup or that a keyboard can't type. It starts with an ampersand and ends with a semicolon, like & for &, < for <, or © for the copyright sign. Numeric forms like © or © address the character's Unicode code point directly.
Inside element text, & < and > are the three that matter: & could start an entity, and < could start a tag. Escape & whenever it's followed by something that could look like an entity, and escape < always; > is technically forgiving in text but escaping it is standard practice. Inside attribute values you should also escape quotes that match the delimiter.
(U+00A0) is a non-breaking space. A browser will not wrap a line at it, and HTML collapses runs of normal spaces down to one, while nbsp sequences render in full. That's why old-school indenting used nbsp runs and why prices like 10 USD keep the unit glued to the number.
Yes. © is the copyright sign but © also works in HTML5, while Greek letters are strictly case-linked: π is lowercase and Π is uppercase. Numeric forms sidestep the whole issue, which is one reason code generators usually emit ...; instead of names.
Because of single-pass decoding. The text &lt; means the original string was literally < (someone escaped an ampersand in front of lt;). Decoding in one pass preserves that; repeatedly re-decoding until nothing changes would corrupt double-escaped text, so well-behaved decoders stop after one pass.
HTML5 defines 2,231 named character references, 2,125 of them terminated with a semicolon (the rest are legacy forms that work without one). This converter maps 131 that cover everyday text: markup specials, currency, punctuation, math symbols, Greek letters, and accented Latin characters. Anything else still round-trips through numeric decimal or hex forms.
No. All four encode modes leave double and single quotes exactly as typed, so <a title="5 > 3">it's</a> comes back as <a title="5 > 3">it's</a>. For an attribute value, change the quote that matches your delimiter to " or ' by hand. Decoding works both ways: ", ' and ' all turn back into quote characters.
Usually one of two reasons. The decoder needs the trailing semicolon, so © and © stay as typed. And it only knows 131 names, so valid ones such as É, þ and − are left alone. Numeric references always decode: É gives É.