Text to HTML Entities
Turn any text into HTML character references and back.
Convert Text to HTML Entities
This converter rewrites text as HTML character references. Unlike a typical HTML escaper that only touches <, > and &, it can turn every character — or every non-ASCII character — into an entity, in named, decimal, or hexadecimal form. Paste entity-encoded text into the decoder to get the original characters back.
What is an HTML entity?
A character reference is a way to write a character using only plain ASCII. It always starts with & and ends with ;. There are two kinds:
- Named entities use a mnemonic:
©for ©,éfor é, for a non-breaking space. - Numeric references use the Unicode code point, either in decimal (
©) or in hexadecimal with anx(©).
The browser renders all three spellings as the same symbol, so Café shows up as “Café”.
Common entities
| Character | Named | Decimal | Hex |
|---|---|---|---|
| & | & | & | & |
| < | < | < | < |
| © | © | © | © |
| é | é | é | é |
| € | € | € | € |
| → | → | → | → |
Choosing a scope
- Every character – each letter, digit, and symbol becomes a reference; whitespace and line breaks are kept so the layout stays readable. Named format uses names where they exist and decimal for the rest.
- Non-ASCII + special – plain English text stays readable while accents, currency signs, arrows, and emoji are converted. Ideal for HTML email and for systems with shaky UTF-8 support.
- Only special characters – the classic minimal escaping.
When to use entities
Use them to show symbols that aren't on your keyboard, to keep templates pure ASCII, to obfuscate an email address in page source, or to debug how a CMS stores special characters. For everyday escaping of user input, HTML Encode / Decode is the simpler choice; to see the raw code points behind each character, try Text to ASCII.
Frequently Asked Questions
Why would I convert letters like 'a' to a?
Encoding every character hides the text from naive scrapers (for example an email address in a mailto link), tests how a parser or sanitizer handles entities, and guarantees that the markup survives any character-set conversion. Browsers display the result exactly like the original text.
Named or numeric entities – which should I use?
Named entities such as é or ♥ are easier to read in source code, but only a few hundred characters have names. Numeric references (é or é) exist for every Unicode character, including emoji, and are understood by every HTML and XML parser.
Can I convert emoji to HTML entities?
Yes. An emoji like 😀 becomes 😀 (decimal) or 😀 (hex). The tool works with full Unicode code points, so it produces a single reference per emoji instead of two broken surrogate halves.
Does this work for XML too?
Numeric references (decimal and hex) are valid in any XML document. Named entities other than & < > " and ' are HTML-only, so choose the decimal or hex format for XML, SVG, or RSS feeds.