Encode reserved XML markup characters
Input
<note title="Terms & Conditions">Price < $10</note>Example output
<note title="Terms & Conditions">Price < $10</note>Encode reserved XML characters into the five W3C predefined XML entities (&, <, >, ", ') or numeric character references (hex and decimal). Decode XML entities back into raw characters with 100% in-browser privacy.
| XML Specification | W3C Extensible Markup Language (XML) 1.0 (Fifth Edition) §4.6 |
|---|---|
| Predefined Entities | & (&), < (<), > (>), " ("), ' (') |
| Maximum Input | 2 MB |
| Execution Deadline | 3 s |
Input
<note title="Terms & Conditions">Price < $10</note>Example output
<note title="Terms & Conditions">Price < $10</note>Input
<data attr="val">A & B €</data>Example output
<data attr="val">A & B €</data>Unlike HTML5, which recognizes over 2,000 named character references (like © or €), XML 1.0 strictly defines only five predefined entities. Any non-ASCII character must either remain raw UTF-8 or be encoded as a numeric character reference (&#...;).
Double quotes (") and apostrophes (') only strictly require escaping when contained within XML attribute values delimited by that same quotation mark. This tool allows customizing quote escaping styles to preserve clean text readability.
Both decimal (A) and hexadecimal (A) character references are parsed and validated according to Unicode code point constraints, discarding invalid surrogate halves.
HTML Entities Encoder & Decoder
Encode reserved HTML characters and symbols into named or numeric HTML entities, and decode entities back to plain text.
XML Formatter
Format, indent, prettify, or minify XML documents with customizable indentation, comment preservation, and self-closing tags.
XML ↔ JSON Converter
Convert bi-directionally between XML and JSON documents with configurable indentation, attribute prefixes, text node handling, and local XXE protection.
ASCII & Unicode Code Point Converter
Convert text characters into ASCII/Unicode code points, hex, decimal, or escape sequences, and translate code points back to text.
The five predefined entities in XML 1.0 are & (ampersand &), < (less-than <), > (greater-than >), " (straight double quote "), and ' (straight apostrophe/single quote ').
No, unless they are explicitly declared in the XML Document Type Definition (DTD). Without a DTD declaration, an XML parser will fail with an undefined entity fatal error. Use numeric character references like © or © instead.
Yes. All processing runs locally inside your browser via web workers. No input text or results are sent to remote servers.