How to use the HTML Entity Encoder
Generate HTML entities in four steps:
1
Paste your text
Enter any text containing special characters you want to convert to HTML entities.
2
Choose the entity format
Select Named (©) for human-readable entities, Decimal (©) for universal numeric compatibility, or Hex (©) for hexadecimal references.
3
Select the encoding scope
Choose 'All special chars' to encode everything possible, 'HTML chars only' to encode just & < > " ', or 'Non-ASCII only' to encode characters outside the ASCII printable range.
4
Copy the entity-encoded output
The output shows your text with all matching characters converted to entities. Copy or download the result.
When to use this tool
Use this tool when you need full entity encoding beyond the five basic HTML characters:
- →Encoding typographic characters like em dashes (—), smart quotes (""), and ellipses (…) for HTML email templates that may not handle UTF-8 reliably
- →Converting Greek letters and math symbols to named entities for scientific or educational web content
- →Encoding accented Latin characters for legacy HTML documents that don't declare a UTF-8 charset
- →Generating HTML entity references for copyright ©, trademark ™, registered ® symbols in legal and marketing pages
- →Converting special characters to decimal or hex entities for XML documents with strict character encoding requirements
- →Building HTML reference documentation or encoding cheat sheets that display entity names alongside their characters
Frequently asked questions
Q:What is the difference between named, decimal, and hex HTML entities?
All three formats encode the same characters and are decoded identically by browsers — they are interchangeable. Named entities like &copy; are human-readable and easier to maintain in source code but require the character to have a defined name in the HTML spec. Decimal entities like &#169; use the Unicode code point as a base-10 integer and work for any character. Hex entities like &#xA9; use the code point in hexadecimal and are common in XML and modern web standards. Choose named for readability, decimal for broad legacy compatibility, hex for modern XML/SVG work.
Q:When should I use 'Non-ASCII only' scope instead of 'All special chars'?
Use 'Non-ASCII only' when your document is UTF-8 encoded and properly declared (as most modern HTML5 documents are), but you specifically need to encode characters above code point 127 — for example, to ensure compatibility with systems that may misinterpret multi-byte UTF-8 sequences. This mode leaves your HTML structural characters (& < > " ') unmodified and only converts typographic, accented, symbol, and Unicode characters to entities. 'All special chars' is better when you want comprehensive encoding for security and maximum compatibility.
Q:Does this tool cover all HTML5 named entities?
This tool covers over 100 of the most commonly used named entities including all accented Latin characters (À–ÿ), Greek letters (α–ω, Α–Ω), common mathematical operators (∑, √, ∞, ≤, ≠, ×, ÷), typographic symbols (—, …, "", ©, ®, ™, €, £), arrows (←, →, ↔, ⇒), and miscellaneous symbols. Characters without a named entity mapping fall back to decimal encoding. The complete HTML5 entity list contains over 2,000 named entities — for exhaustive coverage of rare entities, decimal or hex encoding is recommended.
Q:Should I use named entities or UTF-8 characters directly in modern HTML?
For modern HTML5 documents served with a UTF-8 charset declaration (<meta charset='UTF-8'>), you can safely use UTF-8 characters directly in source — no entity encoding required for most characters. Named entities are mainly needed for the five HTML structural characters (& < > " ') plus characters that are invisible or hard to type. Using UTF-8 directly produces cleaner, more readable source code. Use entity encoding when targeting legacy systems, email clients, or environments where UTF-8 support cannot be guaranteed.
Q:How do I encode a copyright, trademark, or registered symbol in HTML?
The three most common legal symbols have well-known named entities: © is &copy;, ® is &reg;, and ™ is &trade;. Their decimal equivalents are &#169;, &#174;, and &#8482; respectively. Paste the symbol into this tool with 'Named' format selected and it will convert automatically. In modern UTF-8 HTML5 pages, you can also use the characters directly without encoding.
Q:Can I use this tool to encode content for SVG or XML files?
Yes — XML and SVG require the same five core characters to be encoded (& < > " '). XML does not support the full HTML5 named entity set (only &amp;, &lt;, &gt;, &quot;, and &apos; are defined in the XML spec), so for SVG and XML content, use Decimal or Hex format rather than Named — this ensures all characters are encoded using universally-valid numeric references that work in both HTML and XML contexts.