Convert special characters to HTML entities and back
| Character | Entity | Code | Name |
|---|---|---|---|
| < | < | < | Less Than |
| > | > | > | Greater Than |
| & | & | & | Ampersand |
| " | " | " | Double Quote |
| ' | ' | ' | Apostrophe |
| ` | ` | ` | Backtick |
| / | / | / | Slash |
๐ Your text is processed locally
A handful of characters carry special meaning in HTML. Write a < in your content and the browser starts looking for a tag; write an & and it expects an entity. Escaping replaces those characters with safe stand-ins so they show up as literal text instead of being interpreted as markup. Unescaping does the reverse, turning entities back into readable characters.
Your text is processed entirely inside your browser. Nothing is sent to a server, so whatever you paste stays on your own device.
The everyday reason is display. If you're writing a tutorial and want to show someone what a <div> tag looks like, you have to escape it โ otherwise the browser renders an actual div and your example vanishes from the page.
The more important reason is safety. When a site drops user-supplied text straight into a page without escaping it, anything that looks like a tag gets treated as one, and a comment field becomes a way to inject scripts into other people's browsers. That's the basis of cross-site scripting. Escaping on output is the standard defence: the text still displays exactly as written, but the browser reads it as content rather than code. This tool is handy for checking and preparing snippets by hand โ inside an application, escaping should be handled by your framework or templating engine, which does it consistently on every value.
In ordinary page content, the essentials are the angle brackets and the ampersand. Quotes matter as well when your text sits inside an attribute value.
Not for regular HTML. They're there for cases where the text ends up in a template literal or a script context, where those characters can also be significant.
The text was escaped twice โ the ampersand of an existing entity got escaped again. Run it through Unescape once to bring it back.
No. The conversion runs locally in your browser, so nothing you paste ever leaves your device.