Encode and decode special HTML characters
HTML entities let you show characters such as <, > and & on a web page without the browser treating them as code. This tool converts special characters into HTML entities and decodes entities back into normal text. It is useful for writing code examples, cleaning content and avoiding display problems in templates.
Encoding stops the browser from reading characters like < and & as HTML, which keeps your content displaying correctly and helps prevent injection problems.
Encoding turns characters into entity codes such as &. Decoding turns those codes back into the original characters.
HTML treats some characters as part of its syntax. If you want to display them as text on a page, you need to write them as entities. This tool replaces five characters: & becomes &, < becomes <, > becomes >, a double quote becomes " and a single quote becomes '. Decode reverses the process.
Other characters, such as é or ©, are left as they are.
Input: <a href="x">Tom & Jerry</a>
Encoded output: <a href="x">Tom & Jerry</a>. Placed in an HTML page, this displays the original tag as visible text rather than being treated as a link.
It is a code that begins with & and ends with ; that represents a character, for example < for the less-than sign.
Browsers use them to start and end tags. Without encoding, the browser would try to interpret your text as HTML.
No. Only the five characters mentioned above are encoded.
Yes. The tool only changes the text and never runs it.