HTML Entity Encoder
Escape characters that mean something in HTML, such as < > & and quotes, or decode entities like & and é back into plain text.
INPUT
OUTPUT
Runs entirely in your browser. Nothing you enter is sent to a server.
How to encode or decode HTML entities
Choose a mode
Pick Encode to escape text for HTML, or Decode to turn entities back into characters.
Paste your text
Paste a code snippet, an attribute value or text copied from an HTML source.
Copy the result
Paste the encoded text into your HTML, template or CMS, where it will display exactly as written.
Why escape HTML?
Browsers read < as the start of a tag and & as the start of an entity. Escaping them lets you show code samples on a page and keeps text entered by users from being treated as markup.
Named and numeric entities
Common characters have names, such as © for ©. Any character can also be written by its number, such as € for €. Turn on Encode all non-ASCII characters for files that must stay pure ASCII.
Frequently asked questions
Which characters are encoded?
By default & < > " and ' are escaped, which is enough for HTML text and attribute values. The non-ASCII option also turns accented letters, symbols and emoji into numeric entities.
Does decoding run any code in the text?
No. Entities are only converted into characters; nothing in the text is executed or loaded.
Is this the same as URL encoding?
No. HTML entities are for page content. For web addresses and query strings, use URL Encode / Decode.