XML Formatter and Viewer
Paste messy or minified XML and get clean, indented markup you can actually read. Prettify normalizes the document locally, lets you browse elements and attributes in a collapsible tree, and converts to JSON in one click. Nothing is uploaded, so paste your XML to begin.
Pretty-print and inspect
A single line of dense XML becomes properly indented markup, with each nested element on its own line so the structure is obvious. Malformed markup is flagged with the line and column of the problem, so an unclosed tag or a stray character takes seconds to locate.
Beyond the raw markup, the tree view lets you fold and expand elements. Attributes are surfaced alongside the elements they belong to, so you can see an element and its attributes together instead of scanning for them in a wall of text.
Convert XML to JSON
One click turns the document into JSON so you can work with it in tools that expect JSON. Elements become object keys, repeated sibling tags become arrays, and attributes are carried across as keys prefixed with an at-sign so they stay distinct from child elements. Text content sits under a dedicated key.
Prettify notes the attribute mapping when you convert, so the JSON shape is predictable rather than surprising.
Formatting is free; XPath querying is Pro
Pretty-printing, validating, browsing the tree, and converting to JSON are all part of the free tier. Querying the document with XPath expressions to pull out specific nodes is a separate Pro feature, so nothing on the free path implies XPath is included.
Frequently asked questions
Does the XML formatter cost anything?
No. Pretty-printing, validation, the tree view, and conversion to JSON are all free with no sign-up. XPath queries and side-by-side diff are the Pro features.
Is my XML sent to a server to be formatted?
No. The formatter parses and re-indents your markup entirely on your machine, so a document containing internal data or credentials is never transmitted anywhere.
How are attributes shown and converted?
In the tree, attributes appear on the element they belong to. When you convert to JSON, each attribute becomes a key prefixed with an at-sign so it stays separate from child elements.
Can I run XPath queries here?
XPath querying is a Pro feature. The free tier covers formatting, validation, tree browsing, and conversion, but not XPath expression evaluation.
Can I turn the XML into JSON?
Yes. One click converts XML to JSON, mapping elements to objects, repeated tags to arrays, and attributes to at-sign-prefixed keys.