HTML Escape/Unescape
Escape and unescape HTML strings — convert special characters to/from entities safely.
Output will appear here
Start typing to see live output
All escaping/unescaping happens locally in your browser — your data never leaves your device.
HTML Escape converts special HTML characters to their entity equivalents (<, >, ", ', &).
This tool lets you escape text for safe display in HTML and unescape HTML entities back to readable text.
Essential for safely embedding user-generated content in web pages and preventing HTML injection attacks.
Escaping HTML Tags
Input: <div>Hello</div> Output: <div>Hello</div>
HTML tags are converted to their entity equivalents for safe display.
Escaping Quotes and Ampersands
Input: She said "Hi & bye" Output: She said "Hi & bye"
Special characters are properly escaped to prevent syntax errors.
Unescaping HTML Entities
Input: <p>Hello</p> Output: <p>Hello</p>
HTML entities are converted back to their original characters.
Output shows entities instead of rendered HTML
This is correct behavior when escaping — entities display as text, not rendered HTML.
Use the unescaped output if you want to render the HTML in a browser.
Unescaping doesn't work properly
Some text may contain partially-escaped content or mixed entity formats.
Ensure all entities follow the pattern &name; or &#number; without typos.
Why should I escape HTML?
Escaping HTML is crucial for security. It prevents XSS (Cross-Site Scripting) attacks when displaying user-generated content. Unescaped HTML can execute malicious scripts.
What characters get escaped?
The main characters are: < (<), > (>), " ("), ' ('), and & (&). These have special meaning in HTML and must be escaped.
What is the difference between ' and '?
' is the numeric character reference for single quotes and works in all contexts. ' is the named entity but is not valid in HTML4 (only XHTML/HTML5).
Is my data secure?
Yes. All escaping and unescaping happens locally in your browser. Your data never leaves your device.
- HTML FormatterBeautify messy HTML markup with syntax highlighting and a live sandboxed preview.
- XML Escape/UnescapeEscape and unescape XML strings — properly encode special characters for XML documents.
- URL Encoder/DecoderEncode text to URL format and decode URL-encoded strings with Unicode support.
- Base64 EncoderEncode and decode Base64 strings instantly — supports text and URL-safe mode.
- JSON Escape/UnescapeEscape and unescape JSON strings — ensure valid JSON formatting with proper character escaping.
- JavaScript Escape/UnescapeEscape and unescape JavaScript strings — convert special characters to escape sequences.