Text to HTML entities for symbols and special characters
The text to HTML entities converter is the quickest way to find the entity code for a symbol. Paste a heart, a trademark sign, an arrow or an accented name, and each character is replaced with its HTML5 named entity — ♥, ™, →, é — or a hexadecimal reference when no name exists.
Example
Input:
Ünïcödé “quotes” — 5 × 3 ≠ 16 ♥ ☺Output:
Ünïcödé “quotes” — 5 × 3 ≠ 16 ♥ ☺
Frequently used entities
| Symbol | Named entity | Numeric |
|---|---|---|
| © | © | © |
| ® | ® | ® |
| ™ | ™ | ™ |
| — | — | — |
| “ ” | “ ” | “ ” |
| € | € | € |
| × | × | × |
| non-breaking space | |   |
Named entities are case-sensitive and must end with a semicolon to be safe in every context. Copy them exactly as the tool writes them — É and é are different letters.
Why use entities instead of the character?
On a page saved and served as UTF-8 you can type any of these characters directly. Entities are still useful when:
- you are editing HTML in a tool or keyboard layout where the symbol is hard to type;
- the text goes into an email template, a legacy ISO-8859-1 page or an ASCII-only configuration file;
- you want invisible characters such as
,­(soft hyphen) or‍to be visible and deliberate in the source code.
Entities in different contexts
- Entities work in HTML element content and attribute values, and in most Markdown renderers, which pass them through to HTML.
- XML only predefines five names, so use numeric references such as
♥in XML, SVG and RSS files. - Email subject lines and plain-text emails are not HTML; entities there appear literally. Type the character itself instead.
Plain ASCII letters, digits and punctuation stay as they are unless you tick Encode every character. The markup characters < > & " ' and the backtick are always converted, so the output is safe to paste into HTML.
Need the reverse? HTML Entities to Text decodes entity codes back into symbols. For a full character code table in decimal, hex and binary, try Char to ASCII. The conversion runs in your browser.
When to tick "Encode every character"
By default only characters that need it are converted, which keeps the HTML readable. Encoding every character, letters included, has a few narrower uses:
- Testing decoders. A string made entirely of entity references is a good check that a template engine, feed parser or email client decodes them instead of showing codes.
- Keeping text away from naive find-and-replace. Build scripts that search the source for a word will not match its encoded form.
- Light email obfuscation. Encoding an address in a
mailto:link hides it from the simplest harvesters, but any scraper that decodes HTML the way a browser does reads it instantly, so do not rely on it for protection.
The result is several times longer than the input and hard to edit, so keep the original text somewhere and convert again after changes rather than editing the encoded form.