Text utilities

HTML Escape Tool

Encode five reserved HTML characters for use as plain text in HTML markup.

Text stays in your browserCopy your result

Input workspace

Runs on your device

OUTPUT WORKSPACE

Your result

Let’s calculate.

Use the Calculate button to see your result.

Your content is processed locally.

How to use this tool

  1. Enter text to escape.
  2. Select Update result to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

Replace ampersand, less-than, greater-than, double quote and apostrophe with their HTML entity forms in one pass.

A WORKED EXAMPLE

<p> becomes &lt;p&gt; and Tom & Jerry becomes Tom &amp; Jerry.

What to keep in mind

This is text escaping, not a general HTML sanitizer. JavaScript, CSS and URL contexts have different escaping requirements. Already escaped entities are escaped again.

Common questions

Can I use this to sanitize an entire untrusted webpage?

No. It converts markup into literal text; use a maintained context-appropriate sanitizer for permitted HTML.

Is my content uploaded?

No. This tool processes the text in your browser. Copy only the result you intend to share.

Methodology maintained by ClarityKit. How these tools are built and checked.