HTML Entity Encode / Decode
Encode special characters as HTML entities and decode them back — all in your browser.
Runs 100% in your browser — nothing is uploaded
About this tool
The HTML Entity tool converts special characters like &, <, >, ", and ' into their HTML entity equivalents (&, <, >, ", '), and decodes HTML entities back to their original characters.
HTML entities are essential for displaying reserved characters in HTML without them being interpreted as markup. They are also used to include characters that are difficult to type, like copyright ©, trademark ™, and non-breaking spaces.
This tool encodes the five standard HTML-reserved characters, plus decodes over 20 named entities and arbitrary numeric entities (&#decimal; and &#xhex;). All processing runs in your browser with zero network requests.
Frequently asked questions
Why do I need HTML entities?
HTML parsers interpret < and > as tag delimiters and & as entity starts. To display these as literal text, they must be encoded as <, >, and & respectively.
What is the difference between ' and '?
' is the numeric entity for a single quote. ' is an XML entity but is not officially part of HTML4. In HTML5, ' is valid, but ' has broader compatibility.
Should I encode all characters or just the unsafe ones?
Only the five reserved HTML characters (&, <, >, ", ') must be encoded. Other characters can be used directly in UTF-8 encoded documents.