Developer Tool
HTML Escape / Unescape Tool ๐ŸŒ

Convert HTML special characters to their safe entity equivalents, or unescape entities back to readable characters. Essential for web developers and content writers.

Common entities (click to insert)
< โ†’ &lt;
> โ†’ &gt;
& โ†’ &amp;
” โ†’ &quot;
‘ โ†’ &#39;
ยฉ โ†’ &copy;
ยฎ โ†’ &reg;
โ„ข โ†’ &trade;
0 characters
๐Ÿ“‹ How To Use
1
Select a mode. Choose “Escape HTML” to convert characters like < > & into safe HTML entities, or “Unescape HTML” to convert entities back to their original characters.
2
Configure options. In Escape mode: toggle whether to escape quotes (useful for attribute values), escape non-ASCII characters, or use numeric entities (<) instead of named ones (&lt;).
3
Paste your text. Enter HTML code, raw text, or any string containing special characters into the input box.
4
Click the button. The result appears immediately with a count of how many replacements were made. Copy it with one click.
โš™๏ธ How It Works
๐Ÿ”’
HTML Escaping
Replaces reserved HTML characters with their entity equivalents so they are rendered as literal text rather than interpreted as HTML markup by the browser.
๐Ÿ”“
HTML Unescaping
Converts both named entities (&amp;, &lt;) and numeric entities (&#60;, &#x3C;) back to their original characters using a browser DOM parser.
๐Ÿ”ข
Numeric Entities
When enabled, outputs &#60; instead of &lt;. Numeric entities are universally supported and useful when named entities might not be recognized by older parsers.
๐ŸŒ
Non-ASCII Escaping
When enabled, converts characters outside the ASCII range (like รฉ, รผ, โ‚ฌ, โ„ข) to their numeric HTML entities, ensuring compatibility with ASCII-only systems.
CharCharacter NameNamed EntityNumeric Entity
<Less than&lt;&#60;
>Greater than&gt;&#62;
&Ampersand&amp;&#38;
Double quote&quot;&#34;
Single quote&#39;&#39;
ยฉCopyright&copy;&#169;
ยฎRegistered&reg;&#174;
โ„ขTrademark&trade;&#8482;
โ‚ฌEuro sign&euro;&#8364;
&nbsp;Non-breaking space&nbsp;&#160;
โ“ Frequently Asked Questions
If you insert raw HTML characters like < and > directly into web page content without escaping, the browser interprets them as HTML tags rather than literal characters. This can break your page layout and โ€” more critically โ€” create Cross-Site Scripting (XSS) security vulnerabilities if the content comes from user input. Always escape user-generated content before displaying it in HTML.
Both represent the less-than character (<). &lt; is a named entity โ€” a human-readable shorthand defined in the HTML specification. &#60; is a numeric entity โ€” it directly references the Unicode code point of the character (60 in decimal). Both are valid and render identically in browsers. Named entities are more readable; numeric entities work in any context regardless of whether named entities are supported.
Yes, when the content appears inside HTML attribute values. For example, <input value=”user’s name”> is fine, but <input value=”say “hello””> would break the attribute. Escaping the inner double quotes as &quot; fixes this. Inside regular text content between tags, escaping quotes is optional but harmless.
Cross-Site Scripting (XSS) is a security attack where malicious JavaScript is injected into a web page through unescaped user input. For example, if a user submits <script>alert(‘hacked’)</script> and it is displayed without escaping, the script executes in other users’ browsers. Escaping converts this to harmless text: &lt;script&gt;alert(‘hacked’)&lt;/script&gt;, which browsers display as literal characters, preventing execution.
Use HTML unescaping when you have received entity-encoded text that you want to read as plain characters. Common scenarios: converting escaped HTML from a database or API back to readable text for editing, processing escaped content in scripts before transformation, reviewing the actual content of HTML templates, or converting entities in metadata or RSS feeds to plain text.
Hostinger Icon
Hostinger โ€” Recommended by StepReveal

Fast tools need fast hosting. This is ours.

Every tool on StepReveal loads at lightning speed because we do not cut corners on infrastructure. Hostinger gives us NVMe storage, global CDN, and 99.9% uptime โ€” at a price that makes zero sense for how good it is.

Building anything online? Stop overpaying. Start where we did.

Claim Your Hosting Deal โ†’

* Affiliate link โ€” we earn a small commission at no extra cost to you.

โšก
NVMe Speed Up to 4x faster than standard SSD
๐ŸŒ
Free Domain Included with every annual plan
๐Ÿ’ฐ
From $2.99/mo No hidden fees. Cancel anytime.
๐Ÿ”’
99.9% Uptime Backed by a real guarantee
๐Ÿ› ๏ธ

Found a Bug or Have a Suggestion?

Help us improve this tool. If you found an error, have a feature request, or think something could work better โ€” we would love to hear from you.

Submit Feedback