How to use it
Choose "Escape" and enter text to make it safe to write inside HTML. Choose "Unescape" to turn references such as < or あ back into characters.
Characters that are escaped
| Character | Becomes | Why |
|---|---|---|
| & | & | starts a character reference |
| < | < | starts a tag |
| > | > | ends a tag |
| " | " | ends a double-quoted attribute value |
| ' | ' | ends a single-quoted attribute value |
"&" is always replaced first, otherwise "<" would be escaped twice into "&lt;". The apostrophe becomes ' because ' was not defined in HTML 4.
When you need it
- Showing HTML or code examples on a web page or in a blog post
- Displaying text that users typed: unescaped tags in user input are the cause of cross-site scripting (XSS)
- Putting text with quotation marks into an attribute such as alt or title
HTML text and attribute values are covered here. Values inside <script> or inside URLs need different handling (JavaScript string escaping, URL encoding).
How unescaping works
Decoding uses the browser's own HTML parser, so named references such as © and numeric ones such as あ decode exactly as in a browser. The input is parsed as plain text only, so tags or scripts in it are never created or run.
Frequently asked questions
Is my text sent anywhere?
No. Everything runs in your browser.