XML Escape Unescape
Escape XML character data or decode valid entity references with explicit XML 1.0 and 1.1 character rules.
Paste XML content, RSS text, SVG fragments, SOAP payload values, sitemap text, or already escaped XML entities.
Conversion Settings
Options
These checks apply to character data and entity references. They do not parse element structure, namespaces, DTD declarations, schemas, or external entities.
Escape the text value, not an entire XML document
In element character data, & and < have markup meaning and must be escaped when they are literal text. Quotes matter when they match an attribute delimiter. Escaping a complete XML fragment will also escape its tags, so this page is for text values and entity references rather than structural XML editing.
Only five entities are predefined by XML
&, <, >, ", and ' are available without a DTD declaration. HTML names such as are not automatically XML entities.
“Avoid double escaping” is deliberately strict
Only the five predefined names and numeric references that are valid for the selected XML version are preserved. Unknown named references are escaped as text instead of being allowed to produce undeclared entities.
XML 1.0 and XML 1.1 differ around control characters
XML 1.0 rejects most C0 controls even when written as numeric references. XML 1.1 permits references to more control characters, but many of them are restricted and still cannot appear literally. In XML 1.1 mode, restricted numeric references stay encoded when unescaping so the output does not quietly become ill-formed XML text.
What normalization can and cannot establish
Normalize mode decodes references this page can safely interpret, then escapes the resulting character data again. It does not prove that an XML document is well-formed, resolve internal or external DTD entities, validate namespaces, apply a schema, or check an RSS, SOAP, SVG, sitemap, or application-specific vocabulary.
Security and privacy boundary
Conversion is local browser string processing. No DTD is fetched and no external entity is resolved here. That does not protect the generated text from XXE or entity-expansion behavior in a separate XML parser that later consumes a full document; configure that parser independently.
Line-ending option is not parser-level XML normalization
LF and CRLF options only rewrite pasted CR/LF sequences. XML processors have their own end-of-line normalization rules, and XML 1.1 additionally recognizes NEL and U+2028. This page does not simulate the complete parser normalization stage.
XML references used for these boundaries
The XML 1.0 Recommendation defines the five predefined entities, legal characters and character references. XML 1.1 expands the character-reference model while keeping NUL forbidden and restricting direct use of several control ranges.
