XML Escaper

Safely prepare text for inclusion in XML documents by escaping special characters.

Use the XML Escaper

Paste your text below and the tool will automatically escape characters like <, >, &, ', and ".

How the XML Escaper Works

The XML Escaper replaces specific characters in your text with their corresponding XML entity references. This prevents parsing errors and ensures your data is correctly interpreted within an XML structure. The characters escaped are:

  • `<` is replaced with `&lt;`
  • `>` is replaced with `&gt;`
  • `&` is replaced with `&amp;`
  • `'` is replaced with `&apos;`
  • `"` is replaced with `&quot;`

Simply paste your text into the input area, and the tool will instantly provide the escaped version in the output area, ready for use in your XML documents.