XML diff tool for Mac

Compare XML files side by side on Mac

XML Lens is a macOS XML diff tool with two editable panes. Lines mode highlights changed lines; Semantic mode compares the documents by meaning, ignoring formatting, attribute order, and namespace prefix names, and lists each real difference. You can open files, paste or type XML, and export a report without sending either document to a server.

Listed as XML Editor Lens: XPath on the Mac App Store.

XML Lens Compare on macOS in Semantic mode: a minified and a reformatted config file, with three real differences listed below
Semantic Compare ignores formatting and attribute order and lists the three changes that matter.

Compare by meaning, not formatting

Choose Semantic at the top of Compare and XML Lens compares the data, not the text. Indentation, line breaks, attribute order, and namespace prefix names no longer show up as changes. Each real difference, such as an attribute value that changed or an element that moved, is listed under the two documents; select one to scroll both sides to it.

Lines mode is still there for a classic line-by-line view, and it is used automatically when a document is not well-formed.

For a walkthrough with examples, how to compare XML files covers both modes.

  • Ignores formatting, attribute order, and prefix names
  • Lists each real difference with its path
  • Options for element order, comments, and matching rules
  • Lines mode for a classic text diff

Compare the documents you actually have

The Compare workspace accepts local files and direct text input, which makes it useful for staging-versus-production payloads, generated configuration, QA fixtures, and support investigations. Both sides remain editable while the comparison updates as you work.

  • Open or drag XML into either pane
  • Paste directly without creating temporary files
  • Move through detected differences
  • Keep both source documents visible while reviewing

Export evidence for review

When a comparison needs to leave the app, export the result as Markdown, HTML, or PDF. The report gives teammates a shareable record of the changes while the original XML stays under your control.

  • Useful for QA and release review
  • Export Markdown, HTML, or PDF
  • Record compare and export activity in local usage history

Compare is not merge

XML Lens does not upload XML content, filenames, paths, or exported reports. Compare highlights additions, removals, and changed lines between two documents. To combine files into one document, use Merge XML: wrap documents under a new root, or append children when the roots already match.

Merge is not a Git-style three-way merge. Review both the diff and the merged output before treating either as production XML.

If your work needs three-way comparison or a full merge workflow, our comparison of XML editors for Mac shows which tools offer it.