HTML Escape & Unescape
Escape text for safe HTML output or decode HTML entities back to readable characters.
Input
Result
How to use
Escaping HTML entities
Press Encode to escape angle brackets and ampersands, or Decode to turn entities back into characters.
- Paste text or markup.
- Press Encode or Decode.
- Copy the converted result.
Frequently asked questions
Can escaping protect against XSS?
Escaping is one layer of defence. Always escape output on the server as well.
Are numeric entities supported?
Yes, decode understands named, decimal and hexadecimal entities.
Related tools
JSON Escape & Unescape
Escape text into a valid JSON string literal or unescape an escaped JSON string.
URL Encode / Decode
Percent encode text for safe URLs or decode a percent encoded URL back to text.
Unicode Encode / Decode
Convert text to unicode escape sequences and decode sequences back to readable text.
HTML Formatter
Beautify HTML with consistent indentation while keeping inline and void elements correct.
CSS Formatter
Beautify CSS with one property per line and consistent indentation.
JavaScript Formatter
Beautify JavaScript with proper indentation, spacing and line breaks.