HTML Escape / Unescape
Convert HTML-special characters (< > & " ') to entity references, or turn escaped text back into the original. Handy when pasting code into an article. Everything runs in your browser, so nothing leaves your device.
When you paste, the direction is auto-detected based on whether the text contains entity references like <.
How to Use HTML Escape / Unescape
Enter the text you want to convert in the box above and the result appears instantly. New here? Press one of the "Examples (click to try)" buttons above the input box — it fills in a sample and sets the direction, so a result shows up right away. You can also switch modes manually with the segment buttons.
Example: escaping <p class="x">A & B</p> for an article gives <p class="x">A & B</p>. Paste that into your blog and it displays as literal text instead of being parsed as a tag. Unescaping turns it back into the original <p class="x">A & B</p>.
- Escape: Converts
< > & " 'to entity references (<and so on). The&is handled first, so an entity it creates is not escaped again (escaping already-escaped text will convert its&too). - Unescape: Turns entity references back into the original characters. Both named references and numeric references (
A/A) are supported. - ⇅ Swap: Moves the result into the input box so you can run the reverse conversion next.
Handy Situations
- Pasting an HTML code snippet into a blog or documentation without breaking the layout
- Posting text that contains
<or>on a forum or comment field - Turning
&and similar in fetched HTML source back into readable characters - Checking escaped strings embedded inside a template or JSON