XML Compare
Compares two XML documents after normalising whitespace, attribute order and optionally comments, and lists each difference with its path.
- Free
- No sign-up
- Works on any device
About XML Compare
A plain text diff flags every reformatted line, even when two XML files mean exactly the same thing. This comparison parses both documents and ignores what XML ignores: indentation, line breaks between elements and the order of attributes, plus comments if you choose. It then walks the element trees and reports changed text, added, removed or renamed elements and attributes that differ, each with a path such as /order/item[2]/@colour. Siblings are matched by name and by position among same-named siblings, so an insertion near the top shifts the items after it.
How to use XML Compare
- Paste the first document into box A and the second into box B.
- Decide whether to ignore comments, extra whitespace in text and namespace prefixes.
- Read the table of differences, each with a path, and fix or review the elements it names.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
Does attribute order matter in the comparison?
No. Attributes are compared by name and value, so reordering them never counts as a difference. Element order does count where same-named siblings are compared by position.
Why does it say my XML is not well formed?
Both documents must parse as XML with one root element, correctly closed tags and quoted attributes. The message shows the line and column the browser parser reports, which is the first place to look.
Can it compare documents that use namespaces?
Namespace declarations are compared as ordinary attributes, and element names include their prefix. Tick the option to compare local names only when two files use different prefixes for the same namespace.
Is XML Compare free?
Yes. XML Compare on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.