HTML Entity Converter
Escape HTML into safe entities, or unescape entities back into characters. One toggle, instant results.
The moment you want to show HTML code on a web page — in a tutorial, a blog post, a code sample — you hit a wall: the browser renders
How to escape HTML
- Paste your text or markup into the input box.
- Pick the direction: Escape (characters → entities) or Unescape (entities → characters).
- Click Convert. Escaping covers & < > " and ' — the five characters that must be escaped in HTML content.
- Unescape also resolves numeric references like © and ❤ back to real characters.
- Click Copy output when you’re done.
HTML escaping example
This raw HTML:
<a href="/docs">Docs & Guides</a>escapes to:
<a href="/docs">Docs &amp; Guides</a>Frequently asked questions
When do I need to escape HTML?
Whenever untrusted or literal text goes into an HTML context: displaying code samples, echoing user input, or embedding text that contains <, >, or &. Escaping is also the core defense against XSS when rendering user content.
Which characters get escaped?
The five that matter in HTML content: & (always first), <, >, " and ’. Other Unicode characters generally don’t need entities in modern HTML.
Does it support numeric entities on unescape?
Yes — both decimal (©) and hexadecimal (❤) forms are converted back to their characters.
Related developer tools
💬 How was this tool?
Thanks for your feedback!
It helps us improve AI Directories.