HTML Entity Encoder / Decoder
Escape HTML special characters or turn named and numeric entities back into readable text.
Result
<p title="Hello">MRHTML & the web’s café</p> Special HTML characters are escaped.
Encode and decode HTML entities
HTML uses characters such as less-than signs and ampersands as part of its
syntax. Encoding makes those characters display as text. Decoding restores
the characters represented by named entities such as © and numeric references such as 😀.
- Choose Encode or Decode, then paste your text.
-
Review the live result. Encoding
A & BproducesA & B. - Copy the result or download a plain text file.
What changes?
Encoding escapes ampersands, less-than and greater-than signs, double
quotes, and single quotes. Other Unicode text stays readable. Existing
entities are encoded again: an ampersand in & becomes &amp;. Decoding makes one pass using HTML5
text-context rules; unknown entity names remain unchanged.
Limits and safe use
All conversions run in your browser. Decoding is not sanitization: decoded text may contain HTML or scripts, so review it before putting it into a web page. This tool displays the output as text and never runs it. HTML attribute parsing has different rules for some entities without semicolons; use complete, semicolon-terminated references for predictable results.