What is an XML file?
A plain text file that keeps data inside named tags, like <price>. XML stands for eXtensible Markup Language.
Paste XML to pretty print it as you type. Broken tags are named with their line, and the tree view gives the XPath of every node.
Indented, easy to read
Spaces or a tab per level
Paste XML, drop a file or open one to start.
Your formatted XML shows here as you type, ready to copy or download.
Pretty print XML feeds, sitemaps, SOAP messages and config files, or minify them to a single line before sending.
A free XML formatter with no account and no upload: it runs inside this tab, even on files of up to 50 MB.
Pretty print, check and shrink XML in three steps.
Paste XML into the left box, or drop an .xml, .xsd or .svg file on it. The indented copy shows up on the right.
A red note names the problem, such as a closing tag that does not match, and its line. Fix repairs common slips.
Choose 2 spaces, 4 spaces or a tab, or Minify for one line. Then copy the XML or save it as a new .xml file.
The check follows the XML 1.0 rules that browsers, Java and .NET parsers apply: one root element, every tag closed in order, attribute values in quotes and a bare & written as &. The first break is named in plain words, such as "</item> closes <price>, opened on line 12", and its line is marked.
Fix handles the slips that stop most files: a bare & in a URL, a < inside text, attribute values without quotes, stray text before the <?xml line and tags left open at the end. It lists what it changed, so you can look over each repair.
This checks that your XML is well formed, the test xmllint and most XML checkers run first. It does not test the file against an XSD or DTD schema, so XML can pass here and still be refused by a system that expects other elements.
Big XML exports are hard to scan even when indented. The Tree tab shows each element as a branch you open and close, with its attributes beside the name and a count of what is inside, so a 20,000 line feed reads as an outline.
Click any element, attribute or text to get its XPath, such as /catalog/book[3]/price or /rss/channel/item[2]/@id, ready for XSLT, Python's lxml or Java. Expand all and Collapse all move between the whole file and its top level.
Open and close elements, see attributes and child counts, and expand or collapse all levels at once.
Click a node in the tree to copy its XPath, with positions like item[2] where siblings share a name.
Drop the spaces and line breaks between tags to send XML as one line. The size saved shows below.
Turn XML into <text> to paste inside another document, or unescape it back into real tags.
Comments, CDATA, the <?xml?> line and DOCTYPE stay as written, and text inside tags is not touched.
Feeds, exports and logs up to 50 MB open here, read in a background thread so typing stays smooth.
SOAP calls, configs and exports often hold keys and customer data, so nothing here is sent or saved.
Parsing, checking and pretty printing happen in your browser. No XML, password or token goes online.
What you paste is kept in this browser only, so a refresh keeps it. Clear deletes it from the tab.
No sign-up, no email and no limit on files. Use the XML formatter free, as often as you need it.
A plain text file that keeps data inside named tags, like <price>. XML stands for eXtensible Markup Language.
Drop it on the box above to read it indented or as a tree. Any browser, Notepad, TextEdit or VS Code opens it as text too.
Go to Data, Get Data, From File, From XML and pick the file. Excel turns its repeating elements into rows of a table.
Both store data as text. XML wraps values in named tags that can carry attributes; JSON uses keys, arrays and braces.
Write <!-- your note --> anywhere outside a tag. Two hyphens in a row are not allowed inside, and comments never nest.
A <![CDATA[ ... ]]> section holds text that is not read as markup, so < and & can stay as they are, as in code samples.
Install XML Tools from Plugins Admin, then pick Plugins, XML Tools, Pretty print. Or paste the XML into the box above.
Yes. <Item> and <item> are two different tags, so <Item></item> is an error. Attribute names are case sensitive too.
Still stuck, or found a problem? Email dobliquestudio@gmail.com and we will help.