XML Formatter
Pretty-print XML.
DOMParser indent. Invalid XML is rejected.
What XML Formatter does
DOMParser indent. Invalid XML is rejected.
XML Formatter sits in the Developer group on purpose. It is not XML to JSON (Convert an XML tree to JSON.) and not JSON to XML (Serialize JSON as an XML document.). Choose this page when you need Pretty-print XML. If you stretch XML Formatter into a neighbor’s job, the result will look wrong even though the site chrome looks the same.
How to use XML Formatter
- Keep this tab on XML Formatter (/developer/xml-formatter). Pasting into the wrong Developer tool (for example XML to JSON) changes the job.
- Paste or type the input XML Formatter expects. Path hint: developer · xml formatter. Pretty-print XML.
- Apply the XML Formatter action only. JSON to XML is a different transform (Serialize JSON as an XML document.). DOMParser indent. Invalid XML is rejected.
- Copy the output of XML Formatter if you need it elsewhere. Size/complexity still follows: DOMParser plus indent. DTDs and some namespaces may fail.
- If the text job is actually Convert an XML tree to JSON., leave XML Formatter and open XML to JSON.
When not to use XML Formatter
Skip XML Formatter when a neighbor tool matches better — start with XML to JSON or JSON to XML — or when the description already warns the job will fail. In the tool’s own words: DOMParser indent. Invalid XML is rejected.
Questions about XML Formatter
- What does XML Formatter do that other Developer pages on this site do not?
- DOMParser indent. Invalid XML is rejected. Short version: Pretty-print XML.
- Does XML Formatter upload my file or text to Tool-You servers?
- No. XML Formatter runs in this browser tab. Files stay on the device. Limit note: DOMParser plus indent. DTDs and some namespaces may fail.
- Should I use XML to JSON instead of XML Formatter?
- Use XML Formatter when you need Pretty-print XML. Use XML to JSON when you need Convert an XML tree to JSON. They share a category (Developer) but not the same job.
- What are the limits of XML Formatter?
- DOMParser plus indent. DTDs and some namespaces may fail. Also: DOMParser indent. Invalid XML is rejected.