What the HTML Escape and Unescape does
HTML Escape and Unescape converts text so it can be shown safely inside a web page, and converts it back. Escaping turns characters with special meaning in HTML, such as <, > and &, into entities, so a browser displays them instead of treating them as code. Unescaping decodes named, decimal and hex entities back into plain characters.
How to use it
- Choose Escape or Unescape.
- Paste your text or HTML into the Input box.
- For escaping, decide whether to escape quotes, needed inside attributes, and whether to write non-ASCII characters as numeric entities.
- Copy the result from the Output box.
Example
You want a blog post to show the code <button onclick="save()">Save</button> rather than display a real button. Escaping gives <button onclick="save()">Save</button>, which the page shows as readable code. Unescaping that output returns the original line.
When escaping matters
Any text that comes from users, such as comments, names or search terms, should be escaped before it is placed in HTML. Otherwise someone could type a script tag and run code on your page, a problem known as cross-site scripting. Most frameworks escape automatically; this tool helps when writing HTML by hand, in emails or in documentation.
The option to escape non-ASCII characters writes letters such as é or ₹ as numeric entities, which helps with old systems that mishandle UTF-8.
Questions people ask
Which characters are escaped?
The ampersand and the angle brackets always. Double and single quotes too when “Escape quotes” is on.
Does unescaping run the HTML?
No. Entities are decoded as plain text; tags are not run or shown as elements.
Does it support all named entities?
Yes. Unescaping uses the browser’s own list, so names such as , © and … all work, along with decimal and hex codes.
Is anything uploaded?
No. It all happens in your browser.