XML Escape Unescape Tool for XML Entities and CDATA
XML Escape Unescape converts XML characters to entity references and can turn those references back into characters. It escapes the five predefined XML entities, including quotes in attribute context, and can encode non-ASCII characters as numeric entities. Unescaping accepts named, decimal, and hexadecimal references; you can also toggle attribute context and wrap or unwrap CDATA.
XML Escape Unescape is a browser-based tool for converting XML characters to entity references and turning recognized references back into characters. Use it to prepare XML text for markup, inspect escaped content, or work with CDATA. You can paste or drop XML input, choose an operation, and copy the result.
When escaping, the tool handles the five predefined XML entities: ampersand, less-than, greater-than, quotation mark, and apostrophe. Quotes are included in attribute context, and non-ASCII characters can optionally be written as numeric entities. When unescaping, it recognizes named entities and numeric references written in decimal or hexadecimal. Undefined entity names are rejected with a clear message. Attribute context can be toggled, and CDATA can be wrapped or unwrapped.
XML uses markup to describe structured content, so characters such as the ampersand and less-than sign may need entity references when they appear as data. Escaping helps keep those characters from being interpreted as markup, while unescaping makes entity-encoded text easier to read. CDATA is another way to include text in XML, and the wrap and unwrap actions help when you need to switch between these representations.
The tool runs entirely in your browser. Your input is processed on your device and is not uploaded, stored, or sent to a server; the tool is free, and after the page loads it works offline without a server connection. It is useful for developers and DevOps engineers preparing XML strings, checking escaped content, or handling text for attributes and CDATA.
Step 1: Paste or drop your XML text into the tool. You can use a fragment or an escaped string that you want to read.
Step 2: Choose whether to escape or unescape the content. Escaping replaces XML characters with entity references; unescaping converts recognized references back into characters.
Step 3: Set the options you need: toggle attribute context, optionally encode non-ASCII characters as numeric entities, or wrap and unwrap CDATA.
Step 4: Copy the result and use it where needed. If unescaping encounters an undefined entity name, the tool returns a clear message.
Use case: Embed an XML string inside another XML string without breaking characters or attribute quoting.
Use case: Read a densely escaped XML string by converting its recognized entities back into characters.
Use case: Prepare XML text for a source-code literal by escaping characters that could affect markup.
Use case: Escape attribute content when quotes need to be represented as entities in XML.
Use case: Represent non-ASCII characters with numeric entities when preparing XML text.
Use case: Wrap content in CDATA or unwrap an existing CDATA section when working with XML text.