InovoTools
Developer Tools

XML Escape Tool

Escape the special characters in text so it can sit safely inside XML or HTML. Ampersands, angle brackets and quotes are turned into entities, so Tom & Jerry becomes Tom & Jerry.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the XML Escape Tool

Paste the text you want to put inside an XML element or attribute and copy the escaped result.

The five characters that need escaping

XML reserves five characters. & becomes &amp;, < becomes &lt;, > becomes &gt;, a double quote becomes &quot; and an apostrophe becomes &apos;. Without escaping, a stray < or & makes the parser think a new tag or entity is starting, and the whole file fails to load.

When to use it

Escape any text you drop into XML by hand: product descriptions in a feed, values in a config file or strings in an SVG. If you build XML in code, your library usually escapes for you, and escaping twice turns &amp; into &amp;amp;, so only do it once.

How it works

Escape ampersand, angle brackets, quotes and apostrophes.

Examples

  • With the default values
    InovoTools helps people get everyday tasks done.

Limitations and assumptions

Escapes text only. It does not check whether a whole XML document is well formed.

Frequently asked questions

Which characters are escaped?

The ampersand, less than and greater than signs, double quotes and apostrophes.

Does it work for HTML too?

Yes. The same entities are valid in HTML text and attributes.

Is my text uploaded?

No. Escaping happens in your browser.