Encode and decode HTML entities (named and numeric).
The HTML Entities tool encodes special characters into HTML entities and decodes entities back into plain characters. It can also convert every non-ASCII character to a numeric reference, and includes a searchable reference table of common named entities. Use it to safely show markup as text or to clean up escaped content.
HTML entities are text sequences that stand for characters. They begin with an ampersand and end with a semicolon. A named entity such as & or © uses a name, while a numeric reference such as € or € uses the Unicode code point in decimal or hexadecimal. Entities exist because some characters have special meaning in HTML: less-than and ampersand can start a tag or another entity, and quotes end attribute values. Writing them as entities makes the browser show the character instead of interpreting it. Entities also let you write characters that are hard to type or that your file encoding cannot hold. Escaping text correctly is a basic defence against markup injection, but the right escaping depends on where the text is placed in the page.
The numeric form works in every HTML version, while ' is not defined in HTML 4.
Escaping these characters is the core of safe output for text nodes and quoted attributes, but safe output also depends on context, such as URLs, scripts and styles. Use your framework escaping where possible.
They are the same character. The first uses the decimal code point and the second the hexadecimal one.
The common ones shown in the Entity reference table, including &, <, >, ", ©, € and many accented letters.
is in the table and decodes to a no-break space character. It is shown as (nbsp) in the reference.
No. Encoding and decoding run in the page and the text is not sent to a server.