HTML Escape
Escape & < > " and ' so untrusted text can be safely inserted into HTML pages and attributes.
Runs in your browserText → HTML
Loading tool…
Example
<script>alert("x")</script><script>alert("x")</script>
How to use the HTML Escape
- Paste or type your Text into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the HTML result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
Related converters
HTML Entity EncoderConvert special and non-ASCII characters to HTML entities in named (é), decimal (é) or hexadecimal form.XML EscapeEscape the five XML special characters (& < > " ') so text is safe in XML element content and attributes.HTML UnescapeConvert escaped HTML (<p>, &, ©, €) back to the original characters and markup.XML UnescapeDecode XML entities (& < > " ') and numeric character references back to plain text.CSV EscapeQuote a value for CSV per RFC 4180: wrap fields containing delimiters, quotes or line breaks and double inner quotes.CSV UnescapeRemove CSV quoting from a field: strip surrounding quotes and turn doubled quotes ("") back into single quotes.JavaScript String UnescapeDecode JavaScript escape sequences such as \n, \x41, \u00e9, \u{1F600} and legacy octal escapes into plain text.SQL String EscapeEscape text for an SQL string literal by doubling single quotes, or with MySQL backslash escapes.