Compare XML (XML diff)
Put two XML documents side by side, such as two versions of a pom.xml or a config file, or an expected and an actual API response, and see what changed, line by line and word by word.
Same layout on both sides
XML on one line and the same XML laid out over many lines look completely different. Format both sides to give them the same layout, so only real changes remain.
Attribute order
The order of attributes does not matter in XML. Turn on Sort keys before formatting to order them alphabetically on both sides, so attributes that merely moved do not show up as changes.
Expected and actual responses
Testing a SOAP or REST API that answers in XML? Paste the response you expected on the left and the one you got on the right: a changed value, a missing element or a renamed attribute stands out at once.
Mistakes pointed out first
Each side is checked as you type, so a tag left open or a stray & on one side is pointed out with its line before you compare.
Find each change
Changed lines and words are highlighted, long unchanged stretches are folded, and the arrows jump from one change to the next. Both sides stay editable as the highlights follow, and Swap exchanges them.
Private: nothing is uploaded
Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.
With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.
Questions
How do I compare two XML files?
Paste or open one on each side, or drop each file on its side, then Format both, with Sort keys on if the attribute order may differ.
Does it ignore whitespace?
Format both sides first: the layout then matches, so only changes to elements, attributes and text are highlighted. Whitespace inside text is kept, as it can matter in XML.
Is my data uploaded anywhere?
Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.
More tools
- Formatter & Converter for JSON, YAML, XML, SQL
- JSON Diff – Compare Two JSON Files Online
- YAML Diff – Compare Two YAML Files Online
- TOML Compare – Compare Two TOML Files Online
- CSV Compare – Compare Two CSV Files Online
- XML Formatter, Validator & Minifier
- SQL Query Diff – Compare Two SQL Queries
- Protobuf Text Diff – Compare textproto Messages
- XML to JSON Converter
- Online Diagram & Flowchart Editor
- UUID, Password, Hash & Secret Key Generators