HTML Entity Encoder/Decoder
100% PrivateDeveloper ToolsEncode special characters into safe HTML entities, or decode entities back into text.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
- 1Paste the text you want to convert.
- 2Press Encode entities to make it safe to display in HTML.
- 3Or press Decode entities to turn <, &, numeric entities and common named entities back into characters.
- 4Copy the result from the output box.
Encoding the text: <a href="x">Tom & Jerry's</a> produces: <a href="x">Tom & Jerry's</a> Decoding "<p> & ©" gives back: <p> & ©
- Encoding covers the five characters that matter for safety and correctness: &, <, >, double quote and single quote.
- Decoding understands common named entities (like © and ), decimal entities (©) and hex entities (©). Obscure named entities are left as they are.
- Encoding is not a security filter on its own: still escape output in the right context (attribute, script, URL) in real applications.
Because that is the point: < tells the browser to display a less-than sign as text instead of starting a tag. Your readers see <, the browser sees an instruction to print it.
About this tool
The HTML Entity Encoder/Decoder converts special characters like <, > and & into their safe entity forms so they can be shown as text inside a page, and decodes entities back into characters. It is essential when you are writing code samples, documentation or user content that a browser would otherwise swallow as markup.
Related tools
Part of Ovatly's free tools in Developer Tools.