HTML DOM Diff: Compare Two Pages by Elements, Attributes and Text
Compares two HTML snippets by structure and text, not by lines, and lists each difference with its element path.
Use the tool
Why this tool exists
A text diff of two HTML files is noisy when indentation, attribute order or class order changed. This tool parses both, ignores whitespace and comments, and matches child elements by tag and id.
It reports elements added or removed, attributes added, removed or changed, and text changes, each with a path such as div#app > p. Elements are matched by position among same-tag siblings, so a reordered block shows as a remove plus an add.
How to use it
- Paste the old HTML in A and the new in B.
- Choose whether to ignore class order.
- Read the differences.
- Use the list to review a migration or template change.
Frequently asked questions
How is it different from a text diff?
It ignores formatting and compares the element tree.
Does it render JavaScript?
No. It compares the source you paste.
Why is a moved block a remove plus add?
Matching is by order among siblings, not by content similarity.