XML Escape screenshot

XML Escape

Escape XML special characters (&, <, >, quotes and apostrophes) as entities. Runs in your browser, no upload.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What escaping XML does

The five characters XML reserves are replaced by the entities it defines: ampersand, less-than, greater-than, double quote and apostrophe. The apostrophe becomes ' rather than the ' an HTML page would use, because that is the entity an XML document names. Ampersands are replaced first, so an entity that is already in the text is not double-escaped into something a parser would read as literal text.

How to use it

XML Escape: paste the text into the box above, and press Run to get the escaped XML below.

Worked example

Input:

<note to="Ada">a & b</note>

Output:

&lt;note to=&quot;Ada&quot;&gt;a &amp; b&lt;/note&gt;

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns escaped XML; reloading the page discards both.

The five characters XML reserves are replaced by the entities it defines: ampersand, less-than, greater-than, double quote and apostrophe. The apostrophe becomes &apos; rather than the &#39; an HTML page would use, because that is the entity an XML document names. Ampersands are replaced first, so an entity that is already in the text is not double-escaped into something a parser would read as literal text.

Escape XML special characters (&, <, >, quotes and apostrophes) as entities. Runs in your browser, no upload.

How to use it

XML Escape: paste the text into the box above, and press Run to get the escaped XML below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns escaped XML; reloading the page discards both.

What to Expect

Best for

  • Converting text to escaped XML when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

<note to="Ada">a & b</note>

Sample output

&lt;note to=&quot;Ada&quot;&gt;a &amp; b&lt;/note&gt;

Frequently asked questions

How do I use the xml escape?

XML Escape: paste the text into the box above, and press Run to get the escaped XML below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.