Free XML escape & unescape tool — the five predefined XML entities

Escaping runs entirely in your browser — nothing is uploaded.

XML Escape & Unescape — the five predefined entities

XML reserves a handful of characters for markup, so reserved characters in your data must be written as predefined entities. The XML 1.0 specification defines exactly five. This tool converts text to and from those entities in your browser — nothing is uploaded.

The five XML predefined entities

CharacterEntityRequired in
&&everywhere
<&lt;text & attributes
>&gt;after ]]>
"&quot;double-quoted attrs
'&apos;single-quoted attrs

XML vs HTML

XML uses &apos; for the apostrophe; HTML uses &#39; because &apos; was not defined in HTML 4. If your output is a web page, use HTML Escape instead.

Related tools