Text to HTML Entities

Turn any text into HTML character references and back.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

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: &copy; for ©, &eacute; for é, &nbsp; for a non-breaking space.
  • Numeric references use the Unicode code point, either in decimal (&#169;) or in hexadecimal with an x (&#xA9;).

The browser renders all three spellings as the same symbol, so &#67;&#97;&#102;&eacute; shows up as “Café”.

Common entities

Character Named Decimal Hex
& &amp; &#38; &#x26;
< &lt; &#60; &#x3C;
© &copy; &#169; &#xA9;
é &eacute; &#233; &#xE9;
€ &euro; &#8364; &#x20AC;
→ &rarr; &#8594; &#x2192;

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

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 entities such as &eacute; or &hearts; are easier to read in source code, but only a few hundred characters have names. Numeric references (&#233; or &#xE9;) exist for every Unicode character, including emoji, and are understood by every HTML and XML parser.

Yes. An emoji like 😀 becomes &#128512; (decimal) or &#x1F600; (hex). The tool works with full Unicode code points, so it produces a single reference per emoji instead of two broken surrogate halves.

Numeric references (decimal and hex) are valid in any XML document. Named entities other than &amp; &lt; &gt; &quot; and &apos; are HTML-only, so choose the decimal or hex format for XML, SVG, or RSS feeds.