press ⌘K to switch tools
ENCODE & DECODE
XML String Escaper
Escape and unescape XML special characters.
xml-escape
§01 ABOUT THIS TOOL
Overview
XML reserves five characters — &, <, >, ", ' — that must be written as
entities inside element content and attribute values, or the document fails to
parse. This tool escapes text for safe embedding in XML (config files, SVG,
RSS, SOAP payloads) and unescapes entity-laden XML back to readable text.
How to use
- Choose Escape to convert plain text into entities, or Unescape to reverse it.
- Paste your input into the XML text (or Escaped XML) field.
- Read or copy the converted output from the Result field — it updates as you type.
Examples
<node attr="v">A & B</node>→<node attr="v">A & B</node>Tom & Jerry→Tom & Jerry
Notes
Escaping order matters when done by hand — & must be escaped first or you
double-escape existing entities; the tool handles this in a single pass. These
entities also work in HTML, but HTML defines many more named entities
( , ©, …) that this XML-focused tool intentionally does not decode.
FAQ
Is my input sent to a server?
No. The five-character replacement runs entirely in your browser as a simple string operation. Nothing leaves your machine.
Which characters are escaped?
The five XML special characters: & becomes &, < becomes <, > becomes >, double quote becomes ", and apostrophe becomes '.
Does Unescape handle numeric entities?
It decodes the five named entities plus ' (the numeric apostrophe). Other numeric character references such as あ are left unchanged.