Free online tools

HTML Entity Encoder and Decoder

Escape text you plan to place in HTML or read text containing references such as & or é. Review the converted result as plain text.

Enter your values

This tool processes your input in your browser.

Result

Escape text for HTML

Encode ampersands, angle brackets and both kinds of quotation marks to represent those characters in HTML text or a quoted HTML attribute. To make non-ASCII text readable as reference numbers in source code, select the hexadecimal option.

Decode a complete reference

Enter the semicolon-terminated name or number. The browser decodes named references such as é, decimal references such as é, and hexadecimal references such as é. References are decoded once, and other text is returned as entered.

Frequently asked questions

Can the decoder read accented letters and emoji?

Yes. A numeric reference can represent a Unicode scalar value, including an emoji above U+FFFF. In HTML, a numeric zero or an invalid scalar is decoded to the replacement character.

Why did a reference without a semicolon stay as typed?

This tool reads complete references ending with a semicolon. A complete reference is portable across more HTML contexts.

What if the decoded result contains angle brackets?

The result is shown and copied as plain text. If you intend to use that text inside an HTML element, encode it for the new context.