Online XML Editor
FV-47Edit XML and see at once whether it is well-formed. The first error is shown with its line and column, and a tree view on the right shows elements, attributes and text.
Runs in your browser. Nothing is uploaded.
XML
Your draft is saved in this browser only. Clear removes it.
View
How to use it
- Paste XML, open an .xml file, or press Sample to see an example.
- Read the status line. If there is an error, press Go to error to select it.
- Switch between Tree and Formatted on the right to read the document.
- Press Format or Minify, then copy, save or download the XML.
What well-formed means here
The check makes sure tags close in the order they opened, attribute values are in quotes, there is exactly one root element and entity references are valid. When something is wrong, the status line names the first problem and where it is, for example a closing tag that does not match the element opened two lines earlier. When the XML is fine, it names the root element and counts the elements.
What it does not check
There is no validation against a DTD or an XML Schema, so a document can be well-formed and still be rejected by the program that reads it. A DOCTYPE is skipped, not read, and entities it declares are not expanded. Namespaces are not checked. Format puts each element on its own line and collapses runs of spaces inside text, and Minify removes the space between tags, so use neither where spacing inside text matters.
Questions people ask
How do I find the error in my XML?
Paste the XML and read the status line. It describes the first problem, such as a closing tag that does not match, with its line and column. Press Go to error to select that spot in the editor. Fix it and the check runs again.
Does it validate against an XSD schema?
No. It checks that the XML is well-formed, which is the first step every XML reader needs. Checking against a schema needs the schema file and is not done here, so also test the document with the program or library that will read it.
Can I edit the document in the tree?
No. The tree is read-only. It lists each element with its attributes, marked with @, and its text, and shows a count of children so you can scan large files. Edit in the text pane and the tree updates as you type.
Why did Format change the spaces in my text?
Format collapses runs of spaces and line breaks inside text so each element fits on its own line. That is fine for data files but changes text where spacing matters, such as preformatted content. Undo brings back the original if that happens.
Is my XML uploaded?
Nothing is uploaded. The editor runs in your browser, and your draft is saved only in this browser's local storage so it is there when you come back. Clear removes it. Share link puts the text in the link itself, so only people you send the link to can see it.
About this tool
Checks that the XML is well-formed: tags close in order, attribute values are quoted, there is one root element and entities are valid. The first problem is shown with its line and column, and Go to error selects it. It does not validate against a DTD or XML Schema, and a DOCTYPE is skipped rather than read. Format puts each element on its own line and collapses runs of spaces inside text, so do not use it where spaces in text matter. Minify removes the whitespace between tags and also collapses spaces inside text. Your draft is kept in this browser only.