What is an HTML entity?
An HTML entity is a string starting with an ampersand (&) and ending with a semicolon (;). It is used to render reserved HTML characters or non-printable symbols.
Why should I encode special characters in HTML?
Reserved characters like < or > can confuse the browser's HTML parser, leading to broken layouts or Cross-Site Scripting (XSS) vulnerabilities. Encoding renders them safely as text.
What is the difference between Named and Decimal entities?
Named entities use human-readable names (e.g. <), while decimal entities use the character's ASCII/Unicode code point (e.g. <). Decimal entities are supported universally by all XML/HTML parsers.
How do I decode HTML entity strings?
Switch the tool mode to 'Decode Entities', paste the string containing elements like &lt;p&gt;, and the tool will instantly decode them to standard text.
Can I use this tool to prevent XSS?
Yes. Encoding user inputs into HTML entities before displaying them in the browser is a standard way to prevent malicious scripts from executing.
Are non-breaking spaces supported?
Yes. The decoder parses to standard space characters, along with symbols like ©, ®, and ™.
Does it support emoji conversions?
Yes. Emojis and other high-plane Unicode characters can be encoded into decimal or hexadecimal entities (like 😀 for a smiley face) to ensure safe representation in legacy encodings.
Why are some entities converted to decimal instead of named?
Some Unicode characters do not have a standard named entity shorthand in HTML5 specifications. For these, the tool falls back to decimal or hexadecimal notation automatically.
What is the difference between Hexadecimal and Decimal entities?
Decimal entities use base-10 code points (like &), while Hexadecimal entities use base-16 code points prefixed with an 'x' (like &). Both represent the same character and are parsed identically by modern browsers.
Is single quote (apostrophe) encoding safe in XML?
Yes. In XML and XHTML, single quotes are encoded as ', whereas in old HTML4 documents ' was preferred. This tool encodes single quotes safely to ensure compatibility across HTML, XHTML, and XML parser engines.