Paste XML and format it (indented, one element per line) or minify it (no whitespace between tags). Preserves comments, CDATA sections, the XML declaration, and meaningful whitespace inside mixed content (text next to inline elements). Runs entirely in your browser.
curl -sS -X POST https://devops.majbase.com/xml-formatter/api -H "Content-Type: application/json" -d '{"action":"format","xml":"<root><a>1</a></root>"}'
curl -sS -X POST https://devops.majbase.com/xml-formatter/api -H "Content-Type: application/json" -d '{"action":"minify","xml":"<root>\n <a>1</a>\n</root>"}'
Returns {"result": "..."}, or {"error": "..."}.
Want an AI agent (Claude Code, claude.ai, or anything else that supports the Agent Skills format) to use this tool for you on request? Download the skill below and add it:
~/.claude/skills/xml-formatter/SKILL.md