HTML Escape/Unescape

Escape and unescape HTML special chars. XSS prevention, text display.

Data is never sent to the server. Everything runs locally in your browser. Safe for sensitive information.

About this tool

This tool escapes and unescapes HTML special chars in one click. Three features: 1) Escape to < > & etc., unescape to restore, 2) XSS prevention and safe user input display, 3) All processing in browser—no data sent to server.

User registration form input displayed as-is broke the layout because it was interpreted as HTML tags! Escaping special characters is the very basics of XSS (cross-site scripting) protection in web development. With this tool, paste the target string and it instantly converts it to safe characters for display. You can also unescape an escaped string back to readable text with one click.

Tool interface

Usage

  1. Enter text in the input field
  2. Click Escape for entity refs or Unescape to restore
  3. Use for XSS prevention when displaying user input safely

When to use

XSS prevention when displaying user input, escaping HTML in JSON, template output check.

Examples