HTML Escape
Escape text for safe use inside HTML, live as you type, in either direction.
Type in either field — the other updates live, both directions. Uses your browser's own HTML parser, so every named and numeric entity is handled correctly, not just the common ones a hand-rolled mapping would cover. Runs entirely in your browser.
Need the opposite? HTML Unescape
What is HTML Escape?
Type text and get it HTML-escaped instantly. The characters that have special meaning in HTML (<, >, &, and more) are converted to their safe entity form, using your browser's own HTML parser for complete correctness.
How to Use the HTML Escape Tool
- 1
Type or Paste the Text: Enter any text, including markup-like characters such as < > & " '.
- 2
Read the Escaped Result Instantly: The HTML-safe entity form appears automatically as you type.
- 3
Copy the Result: Use the copy button to copy the escaped text for safe insertion into an HTML page.
Why Escape Text for HTML
Characters like <, >, and & have special meaning in HTML: a browser reads < as the start of a tag, not a literal character. If text that contains those characters is inserted into a page as-is, it can be misinterpreted as markup, break the page's layout, or, if the text came from user input, open an XSS (cross-site scripting) vulnerability. Escaping converts those characters into their entity form (< becomes <, & becomes &) so the browser displays them as literal text instead of parsing them as markup.
Common HTML Entities
< → < > → > & → & " → " ' → '
Example
Input: <div class="box">Tom & Jerry</div>
Escaped: <div class="box">Tom & Jerry</div>
Every <, >, &, and " gets replaced with its entity form, so the string can be safely inserted into an HTML page and rendered as literal text rather than parsed as markup.Frequently Asked Questions
Common questions about HTML Escape.