HTML Escape / Unescape

Convert special HTML characters to entities and back.

Also called: HTML entity encoder, HTML decode, escape HTML characters.

FreeNo sign-upRuns in your browser
DEVELOPER

HTML Escape / Unescape

Convert special HTML characters to entities and back.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the HTML Escape / Unescape (13 seconds)

Recorded on a phone, steps written on screen, no sound.

About the HTML Escape / Unescape

Convert special characters like < > & " to HTML entities (&lt; &gt; &amp; &quot;) so they show as text, or turn entities back into characters.

The characters

Escaping turns & into &amp;, < into &lt;, > into &gt;, the double quote into &quot; and the apostrophe into &#39;. The text then shows as written on a web page instead of being read as HTML.

Use it to show code on a blog, to put user text safely into a page, or to read text copied from page source. Unescaping turns the same codes back; other characters are not touched.

How to use the HTML Escape / Unescape

  1. Enter your textType or paste your text.
  2. Pick the optionsaction (the defaults suit most uses).
  3. Press Run toolThe result appears right under the button.
  4. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the HTML Escape / Unescape gives for it (produced by the tool itself, not typed by hand).

Input text
<b>Tea & coffee</b> for "everyone"
Action
Escape

Result:

&lt;b&gt;Tea &amp; coffee&lt;/b&gt; for &quot;everyone&quot;

Good to know

What you need
You type or choose: Input text
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

When do I need this?

When you want to show code or symbols on a web page.

Does it escape Urdu?

No need; Urdu is fine in UTF-8 pages.

More tools in Developer

See all Developer tools