HTML Entity Encoder
Escape the characters you select so your text is safe to place inside HTML markup.
Encode characters as entities
Paste text to escape the characters you select.
How to use the HTML Entity Encoder
- Paste the text you want to escape.
- Tick the characters that should become entities.
- Copy the escaped result with the Copy button.
Features
- Escapes only the characters you tick
- Named entities for the five markup characters
- Optional numeric escaping for every non-ASCII character
- Reports how many characters were replaced
Advertisement
Frequently Asked Questions
Common questions about the free online html entity encoder.
Paste your text and tick the characters to escape. Each one is replaced by the matching
entity in the result box.
The ampersand and the two angle brackets are the ones that matter for safe markup. Quotes
matter inside attribute values.
Because every entity starts with one. If the ampersand were not escaped first, the entities
created for other characters would break.
It writes every character above code point 127 as a decimal numeric reference, which is
useful for old systems and plain text files.
No. By default accented letters and emoji stay as they are unless you tick the non-ASCII
option or escape a specific character.
A named reference uses a short word such as the one for an ampersand, while a numeric
reference uses the code point of the character.
No. Your text stays in the input box and only the result box holds the escaped version you
can copy.
No. Escaping happens in your browser, so nothing you paste is sent to a server or saved
anywhere.
Last updated: October 10, 2026