HTML Entity Converter

This free HTML entity converter converts special characters, symbols and reserved markup into named, decimal or hexadecimal HTML entities, and decodes entity strings back into plain text instantly. Encode brackets, ampersands, copyright signs and accents safely for web pages.

Updated

Direction

Named entities vs decimal and hexadecimal codes

Web browsers interpret specific characters such as the less-than sign (<), greater-than sign (>), and ampersand (&) as structural HTML syntax. If you include these characters directly in page content without proper escaping, browsers may misinterpret your text as malformed markup or execute unexpected scripts. An HTML entity converter resolves this by replacing reserved characters with standardized entity references that browsers display safely.

HTML supports three distinct entity formats for special characters:

  • Named Entities: Human-readable aliases defined in HTML specifications, such as &copy; for the copyright symbol, &amp; for the ampersand, and &trade; for the trademark sign. While intuitive, only a subset of Unicode glyphs possess official named entities.
  • Decimal Numeric References: Format &#D; where D is the decimal Unicode code point, such as &#169; for ©. These are universally supported across all browsers and XML processors.
  • Hexadecimal Numeric References: Format &#xH; where H is the hexadecimal code point, such as &#xA9; for ©. Hexadecimal references align directly with Unicode code point numbers (U+00A9).

When HTML entity encoding is necessary

Modern web standards recommend serving documents with UTF-8 character encoding, which allows authors to include international letters, accented vowels and symbols directly in page source files. However, entity encoding remains essential in several scenarios. Displaying raw code snippets inside <pre> or <code> tags requires escaping <, >, and & to prevent browser rendering errors. Furthermore, legacy database systems, XML feeds, and email templates often mandate strict ASCII compliance, where any non-ASCII character must be encoded as a numeric entity. For a complete listing of all standard names, browse our HTML entities reference table or read our guide to special characters in HTML.

Decoding entities back to readable text

When scraping web pages, inspecting API payloads, or cleaning database exports, text is frequently cluttered with raw entity strings like &quot;, &eacute;, or &#8212;. Selecting the Decode mode in this converter instantly transforms these escape sequences back into clean, readable Unicode characters. You can also explore our Unicode converter for JavaScript escape sequences or identify individual glyphs using the Unicode character lookup.

Frequently asked questions

Why do I need an HTML entity converter for web pages?

An HTML entity converter prevents reserved characters like <, >, and & from breaking web page layout or creating security vulnerabilities, and ensures symbols display reliably across all browsers.

What is the difference between named, decimal and hex entities?

Named entities use memorable text aliases like &copy;, while decimal (©) and hex (©) entities use the numeric Unicode code point. Decimal and hex formats work for any Unicode character.

Does modern UTF-8 eliminate the need for HTML entities?

UTF-8 allows typing most foreign characters and symbols directly, but syntax-reserved characters (<, >, &, ") must still always be encoded in HTML source code.

How does the converter handle reserved HTML characters?

The encoder converts < to &lt;, > to &gt;, & to &amp;, " to &quot;, and non-ASCII characters to their corresponding entity according to your chosen format.