Skip to content
NSNormandin SystemsTHE EVERYDAY TOOLBOXMain site
</>

Development / YOUR EVERYDAY TOOLBOX

Escape HTML entities

Escape or unescape HTML entities (replace characters like <,>, &, " and \' with their HTML version)

✓ Free to use✓ No account neededHow to use this tool ↓
YOUR WORKSPACESee an example ↗

Opening your tool…

Runs in your browser. Check important results and keep a copy of your original files.

THE PRACTICAL GUIDE · NORMANDIN SYSTEMS

Get more from Escape HTML entities

Escape HTML Entities converts special characters into HTML entity references and reverses supported entity references back into characters. Escaping is useful when you want markup-like text to display literally in an HTML document rather than being interpreted as tags. The appropriate escaping depends on context: text content, attributes, JavaScript, and URLs have different requirements. Text and string utilities help make small transformations explicit and repeatable. The important details are often invisible: newlines, spaces, quotation marks, character encoding, and punctuation can all affect the result. Keep the input nearby and try a short example before working with a longer document. When the output will be used in code, a URL, or another structured format, validate it in that destination as well. Readable output alone does not guarantee that every character has the meaning you intended.

Guide updated October 13, 2026

How to use this tool

  1. Paste a short input containing the characters you need to handle. Include a space, punctuation, or non-ASCII character when these occur in the real data.
  2. Choose the escape or unescape panel, paste a short sample, and inspect the transformed special characters.
  3. Review the example below and compare its expected behavior with a small sample of your own input before continuing.
  4. Compare the output character by character where needed, then copy it into the intended destination and verify that it is interpreted correctly.

SEE IT IN PRACTICE

A worked example

EXAMPLE INPUT
<b>Hi</b>
RESULT / WHAT TO EXPECT
&lt;b&gt;Hi&lt;/b&gt;

The escaped form can display the tag syntax as text when interpreted in an HTML text context instead of creating a bold element.

Escaping depends on the insertion context

Escaping angle brackets and ampersands is useful when displaying markup as literal text. Attribute values, JavaScript strings, CSS, and URL components have different parsing rules. A value escaped for one context should not be treated as universally safe for another. Prefer the destination platform's context-aware output mechanism when building an application. Use this tool to understand or prepare a specific representation, and keep the original text so the transformation can be checked.

Decode only the intended layer

An ampersand in an existing entity can itself be escaped, turning &lt; into &amp;lt;. Whether that is correct depends on whether you want to display a less-than character or literally display the entity notation. Repeated encoding without tracking those layers creates confusing output. Test a small example containing an ampersand, an angle bracket, and a quote. When decoding copied text, remember that a decoded tag-like sequence may be interpreted as markup if it is inserted through an HTML-parsing API.

When this tool is useful

  • Display code examples as literal text
  • Decode entity references from a text export
  • Prepare special characters for an HTML text node

Tips for a better result

  • Check ampersands and existing entities to avoid double escaping, then test the value in its actual HTML context.
  • Avoid repeated conversion unless you deliberately need another encoding layer. Double escaping or double encoding often turns a correct value into a visibly different string.
  • Keep the source and the settings used for this result together. That makes a later comparison or correction easier, especially when another person needs to reproduce the same outcome.

Frequently asked questions

Is HTML escaping suitable for every embedding context?

HTML escaping is not a universal defense for every embedding context. Do not reuse HTML-escaped text as if it were safely encoded for JavaScript or a URL.

Why should I test special characters?

Ordinary letters may work even when punctuation, Unicode, or line breaks are handled incorrectly for the destination. A small example containing the difficult characters gives you a much more useful check than a long sample of plain words.

Can I recover the original text from every result?

Some operations are reversible only when the format and encoding are known; others intentionally discard information. Preserve the source and compare a round trip when a corresponding reverse operation is available.

What happens to the information I enter?

The utility processes your input in this browser. Some tools retain field values in browser storage or the URL; avoid entering secrets in shareable fields. Page and asset requests still go to the hosting provider. Read the privacy and offline-use notes for details.