XML Escape / Unescape
Escape the five XML special characters (< > & " ') so text is safe inside XML elements and attributes, or turn entities back into plain text — in your browser.
Suggested tools
About XML Escape / Unescape
XML Escape replaces the five characters that XML reserves — & < > " ' — with the entities & < > " and ', so any text can be placed safely inside XML elements and attribute values without breaking the document.
XML Unescape decodes those entities and numeric character references (₹ or ₹) back into text. Everything runs locally in your browser — the text you paste is never uploaded.
How to use XML Escape / Unescape
- Paste text, or XML containing entities.
- Press Escape or Unescape.
- Copy the result into your XML, SOAP message or config file.
Key features
- Escapes all five XML special characters
- Safe for element text and quoted attributes
- Decodes named and numeric character references
- Escape and Unescape on one page
Example
Price < ₹500 & "Free" delivery
Price < ₹500 & "Free" delivery
When to use XML Escape / Unescape
- Putting text with &, < or quotes into XML elements or attributes.
- Preparing values for SOAP requests and XML config files.
- Reading entity-encoded text from XML exports.
Tips and common problems
- & and < must always be escaped in XML text; quotes matter inside attributes.
- XML does not know HTML entities such as — use   instead.
- CDATA sections are an alternative for long blocks of text with many special characters.
Frequently asked questions
Only & and < are strictly required in element text, and quotes only inside attributes. Escaping all five is always safe and avoids mistakes.
A CDATA section (<![CDATA[ ... ]]>) can hold unescaped text, but it cannot contain the sequence ]]>. Escaping works everywhere.
Not unless the document defines it — XML only knows & < > " and '. Use the character itself or   instead.