Paste XML to format or validate it — everything runs locally in your browser, so your data is never uploaded.
An XML formatter built for development work
Format and validate XML with precise error line numbers, minify for payloads, sort attributes for stable diffs, strip comments for release builds, convert XML to JSON and JSON back to XML (attributes preserved with an @ prefix, text nodes as #text), test XPath expressions against your document using the browser's native evaluator, and escape or unescape entities — all locally in your browser, so API responses and config files containing secrets never leave your machine.
XPath testing
Pick "XPath query", paste your document and type expressions like //book[@id='b1']/title or //@currency — matches update live as you type, with a match count and each result serialized below.
Frequently asked questions
How is XML converted to JSON?
Attributes become @name keys, repeated sibling elements become arrays, mixed text becomes #text, and numeric/boolean strings are coerced. The mapping is reversible with the JSON → XML action.
Does it validate against a schema (XSD)?
It checks well-formedness — the level browsers support natively. Schema validation needs a server-side validator.
Is my XML uploaded?
No — parsing uses the browser's built-in DOMParser; nothing is sent anywhere.
XML was built for structured information exchange
XML 1.0 became a W3C Recommendation in 1998. It adapted ideas from SGML into a format intended to be practical for exchanging structured documents and data on the Web.
Tags carry structure, not presentation by themselves
An XML element name describes structure chosen by the document vocabulary. XML itself does not say that <title> must look large or bold; presentation is a separate concern.
Formatting is not the same as validation
Formatting XML makes the structure easier to inspect, but it does not automatically make the document correct for the application that consumes it.
A document can be well-formed XML and still fail an application's validation rules. For example, the XML syntax may be correct while an expected element is missing, a value has the wrong type, or a namespace is different from what the receiving system expects.
Formatting is most useful when debugging. Indentation makes nesting easier to see, long lines become readable, and misplaced closing tags stand out. Once the structure is readable, validate the document and then investigate application-specific requirements separately.
Minifying XML is useful when you want a compact representation, but it is usually a poor format for manual editing. Keep a readable working copy when people will need to troubleshoot the file later.
XPath is another useful layer. It lets you ask a focused question about a document, such as locating every `item` element or selecting a value beneath a particular node. An XPath result can help verify that the structure is what you think it is before that expression is moved into application code.
Remember that namespaces can make correct XML look unfamiliar. Two tags that appear similar can belong to different namespaces, and a missing or incorrect namespace declaration can cause application-level failures even when the XML is otherwise well formed.
Frequently asked questions
Does formatting XML change its data?
Formatting should change presentation and whitespace rather than the XML elements, attributes or text values. Validation is a separate check: a document can be valid XML while still being wrong for the schema or application that consumes it.
Can I use this to minify XML?
Yes. Use minification when you need a compact representation. Keep a readable copy when humans will be maintaining or debugging the document.
What is XPath useful for here?
XPath lets you target particular nodes or values without manually scanning a large document. It is useful for testing whether a selector actually reaches the information you expect.
Is my XML uploaded?
The core formatting and validation workflow runs in your browser, so the XML you enter for those operations is not sent to an AllDays processing server.