HTML Entity Encoder and Decoder
Show code or user text on a web page without it being read as HTML, or turn a string full of & and ’ back into plain text. Encoding and decoding are one click apart.
How to encode or decode HTML entities
- 1Paste your text or HTML.
- 2Choose Encode or Decode.
- 3Copy the result.
What gets encoded
The five characters that matter in HTML become entities: & as &, < as <, > as >, " as " and ' as '. Turn on non-ASCII encoding to write letters like é and symbols like € as numeric codes too.
Every entity decoded
Decoding understands every named entity in the HTML standard, like , © and é, plus decimal and hex codes like é and é.
Why escape
Escaping text before putting it into a page stops it from being read as tags, which keeps layouts intact and helps prevent cross-site scripting.
Frequently asked questions
- Is my data uploaded?
- No. The conversion runs in your browser and nothing is sent anywhere.
- Decimal or hex codes?
- Both work in every browser. Hex, like é, matches how characters are listed in Unicode charts.
- Do I need to encode non-ASCII characters?
- Not on a UTF-8 page, which is almost every page today. It helps for old systems and some email tools.