About this html entity encoder & decoder
In HTML, a few characters are reserved: < and > mark tags and & begins a code, so to display them literally you swap them for HTML entities such as <, > and &. Encoding does this for you, which is important whenever you put user text inside a web page, because it stops stray characters from breaking the layout or being read as code. Decoding does the reverse, turning entities — including numbered ones like ' and A — back into the characters they stand for. Both directions run entirely in your browser.
Frequently asked questions
- What is an HTML entity?
- It is a short code that stands for a character, like &lt; for the less-than sign. Browsers display the character but treat the code as plain text.
- Which characters get encoded?
- The main reserved ones: < becomes &lt;, > becomes &gt;, & becomes &amp;, and the quote marks become &quot; and &#39;.
- Can it decode number codes?
- Yes. It handles named entities as well as numeric ones in both decimal (&#39;) and hexadecimal (&#x41;) form.