Still squinting at one-line XML
Bank integrations, SOAP gateways, and ERP callbacks still ship bodies like . IDEs beautify XML fine until policy blocks plugins or you are on a jump host with no formatter installed.
Upstream HTML error pages and truncated bodies look like business bugs until you prove the tree parses. I expand XML in the browser first, note the node paths, then decide whether to diff samples or switch to the JSON playbook—skip production grep until the structure is sane.
What the XML Formatter does locally
Paste the full body into XML Formatter and run Format. The page uses the browser DOMParser with application/xml, then XMLSerializer plus local indentation—no round trip through WoDeTool servers, which suits redacted staging captures.
When parsing fails, you get an invalid XML message—the DOM inserted a parsererror node. Typical causes: bare &, unclosed tags, a partial copy, or HTML pasted as XML. Treat that as structure work before chasing field semantics.
Switch to Minify to strip inter-tag whitespace when you need a single line for legacy forms or size checks.
When to stay on JSON instead
If Content-Type is already application/json, use JSON Formatter and the workflow in Debug API responses online. Feeding JSON into the XML parser wastes a click.
Mixed payloads are common: JSON inside CDATA or a small XML snippet inside an HTML error page. After you format XML, diff only the CDATA inner text with Text Diff instead of regex-carving the raw file.
End-to-end workflow (diagram)
I keep a ~30-line minimal Envelope to verify namespace prefixes before pasting the full payload—huge documents hide a single faultstring when you scroll blindly.
Entities, encoding, and triage
Bare ampersands in text nodes break the parser. Scan for & that should be &; HTML copied from a portal may carry —HTML Entity helps inspect encodings before you re-paste.
Legacy encoding="UTF-8" with GBK bytes still happens; the browser cannot magically transcode. Truncated responses stop before the root closes—re-capture raw bytes instead of forcing beautify.
How the indent step works
After DOMParser accepts the document, the formatter serializes documentElement and walks tag tokens to add two-space indents. It is not an XSD validator: optional elements missing from the instance still parse if the tree is well-formed. That is why a prettified file can look perfect while the partner still rejects the message for schema reasons.
Self-closing tags and mixed content behave like the browser’s XML stack, which is close to what you see in Chromium-based clients. If your server runs libxml2 with different entity rules, treat the online pass as a readability aid, then run the canonical validator in CI.
Minify re-parses and collapses whitespace between tags. I use it when a partner’s sandbox only accepts a single physical line even though the logical model is unchanged.
Browser formatter vs CLI and IDE
xmllint --format and IDE plugins are great on a trusted laptop. The WoDeTool page wins when you cannot install packages: locked-down Windows profiles, a vendor VPN laptop, or a quick check from a phone hotspot during an integration war room.
Nothing uploads to WoDeTool servers for this tool—the same constraint that matters when legal asks where staging payloads go. The trade-off is feature depth: no batch folder, no XPath query pane, no automatic XSD fetch.
For a daily driver on your dev machine, keep the CLI. For occasional SOAP faults pasted from Postman or Kafka UI, bookmark the browser path and pair it with Text Diff instead of maintaining yet another local script.
Edge cases worth a second look
Multiple namespace prefixes on the same URI make diffs noisy. Format both samples, then diff only the Body subtree you care about instead of the whole Envelope.
CDATA sections hide inner markup from the parser. Formatting will not pretty-print JSON inside CDATA; copy that inner text manually if you need JSON Formatter.
BOM bytes at the start of a file sometimes survive a copy from a Windows log viewer. If the first tag looks fine but parsing fails, re-copy from a hex-safe export or strip the first invisible character.
Very large responses (multi-megabyte catalog dumps) can freeze a tab while indenting. Grab the Fault fragment plus a few parents, not the entire catalog, when you only need error context.
When a gateway returns text/html with HTTP 200, read the first kilobyte as HTML before assuming XML tools will help—that scenario overlaps with the branching advice in Debug API responses online.
Privacy and scope
Local parsing keeps input in tab memory—fine for sandbox accounts and redacted snippets. Do not paste live PANs, contracts, or customer PII, and avoid sharing ?input= URLs in chat.
The tool pretty-prints and minifies structurally valid XML; it does not validate XSD, verify signatures, or unwrap WS-Security. Security meaning still comes from WSDL, contracts, and server logs.
FAQ
Invalid XML but tags look fine: check unescaped &, literal < outside CDATA, or two root elements glued together.
SOAP Fault text looks like HTML: gateways embed markup inside faultstring or detail—format first, then read the tree.
Diff against yesterday: format both sides, run Text Diff; normalize namespace prefixes if only the prefix changed.
REST JSON only: use JSON Formatter, not this page.
Does minify change semantics? For a document that already parses, minify only removes insignificant whitespace between tags; text node spaces inside elements stay as serialized by the browser.
Can I format a fragment without the XML declaration? Yes, if the fragment is a single well-formed element tree. Multiple top-level siblings still fail until you wrap them or paste the full document.
Partner wants UTF-16: re-encode on the server; the in-browser parser expects the bytes you paste as UTF-16 code units in the textarea, which is rare—most integrations standardize on UTF-8 on the wire.
Worked example (step by step)
1. On staging, POST /soap/account returns HTTP 200, Content-Type: text/xml, one-line Envelope with .
2. Paste into XML Formatter, Format, confirm Fault nests under Body with readable indentation.
3. Note faultstring, compare with the product retry list; if unexpected, format yesterday's success body the same way.
4. Run both outputs through Text Diff for surprise nodes or namespace drift.
5. If formatting fails, hunt bare & and escape to &; use HTML Entity when the snippet came from HTML.
6. Switch to Minify to paste a one-line request back into the legacy tester.
7. Document a side note for JSON callbacks so the team does not apply this XML chain to REST payloads.
Copy-paste reference
Gateway faults often return minified XML — expand in XML Formatter before comparing to JSON equivalents.
<?xml version="1.0"?><error><code>500</code><message>Upstream timeout</message></error>