Escape HTML characters into entities or unescape entities back to text (safe for XSS-sensitive output)
This HTML Escape & Unescape tool converts raw HTML characters into safe HTML entities and can also decode entities back into readable text. Escaping is essential when displaying user-generated content, code snippets, or HTML examples so the browser does not interpret them as markup. It's a common, practical step for preventing HTML injection and reducing XSS risk when rendering untrusted text.
Paste raw HTML or HTML entities into the input
Click Escape/Unescape
Copy the escaped entities for safe display, or copy unescaped text for readability
Use the result in templates, documentation, or debugging workflows
Display HTML code snippets safely in docs and blogs
Escape user-generated input before rendering as text
Decode HTML entities from scraped content or CMS output
Prevent accidental HTML rendering in logs and dashboards
Fix broken strings containing &, <, > and quotes
Escapes and unescapes common HTML entities
Helps prevent unsafe HTML rendering
Instant conversion with one-click copy
Works locally in your browser