How to edit XML online
- Paste XML, open a file or start from the sample. Errors are reported with their line and column while you type.
- Click a node in the tree to jump to it in the text. Tab inserts two spaces of indentation.
- Click Format to tidy the indentation, then copy the XML or download it as an .xml file.
What the editor does for you
- Live checking: unclosed or mismatched tags, unescaped
&and<, missing quotes and duplicate attributes are reported with a plain-English message, and the line is marked next to the line numbers. - Tree view: elements, attributes, text, comments and CDATA sections, rebuilt after every change.
- Format: re-indents the whole document while keeping text, comments and CDATA unchanged.
- Draft: your last text of up to about 2 MB is kept in this browser's local storage and restored when you come back. It is never uploaded.
Tips for editing XML by hand
| Character | Write it as | When |
|---|---|---|
& | & | Always, in text and attribute values |
< | < | Always, in text and attribute values |
> | > | Optional; required only in the sequence ]]> |
" | " | Inside attribute values in double quotes |
' | ' | Inside attribute values in single quotes |
Names are case-sensitive, so <Item> must be closed with </Item>, not </item>. For longer snippets of code or HTML, a CDATA section <![CDATA[ … ]]> saves you from escaping every character.
Frequently asked questions
Is my XML saved or uploaded?
Your latest draft is saved only in this browser's local storage, so it survives a page reload. Nothing you type or open is sent to a server.
Why are HTML entities reported as errors?
XML only defines five named entities: &, <, >, " and '. HTML names such as or © need a DOCTYPE that declares them. Use a character reference such as   or type the character itself.
Does the editor check my XML against an XSD schema?
No. It checks that the XML is well-formed: matching tags, quoted attributes, correct escaping and a single root element. Validation against an XSD or DTD needs a schema-aware tool such as xmllint.
Can I edit large XML files?
Yes, files of several megabytes work. Drafts larger than about 2 MB are not stored in the browser, so download your work before closing the page.