Problem solved by Diff Anything macOSWindows

Find the edits behind an HTML re-indent

Compare two HTML files on Mac. Ignore changed indentation when appropriate, then review changed text, prices, alt attributes and link destinations locally.

See it in the app

From 22 differences to five changes to inspect.

No accounts, cloud comparison service, analytics, or telemetry.

Diff AnythingCompare two HTML files on your Mac and see only the real changes, even when an editor re-indented the whole file: changed text, a new menu item, a changed price, an emptied alt text and a link that now points somewhere else. Watch on YouTube

The problem

Why the usual workflow gets in the way.

A colleague returns an edited web page, and their editor has re-indented the whole file. A line comparison is full of noise, making a changed price or link address harder to find.

The solution

How Diff Anything handles it.

Open both HTML files in Diff Anything. Compare the source side by side with HTML highlighting. Ignore leading and trailing whitespace when indentation is irrelevant, then inspect the remaining edits.

01 / Compare HTML source

Separate indentation from the question you are reviewing

The tutorial compares a bike-rental page with a colleague’s edited copy. Their editor changed the indentation from two spaces to four. The initial text comparison lists 22 differences.

Under Ignore, enable Ignore leading and trailing whitespace. In this example, that leaves five differences: one added line and four changed lines.

02 / Compare HTML source

Check the source behind the visible page

The heading now mentions e-bikes, a new E-bikes menu item appears and the price changes from 4 to 5 euros. The image’s alt text is emptied, and the booking link points to a different address.

Source comparison shows attributes and destinations alongside visible text. It compares HTML text; use a browser separately to check the page’s rendered appearance.

03 / Compare HTML source

Choose ignore options deliberately

Ignore leading and trailing whitespace trims the edges of each line for comparison. Ignore whitespace also treats runs of spaces inside a line as one; Ignore blank lines leaves empty lines out.

Keep these options off when whitespace itself matters to your review, such as content whose spaces are preserved. Use the next-difference arrow and the list of line numbers to check both versions.

04 / Compare HTML source

Local HTML comparison in Free and Pro

The HTML text comparison and ignore options shown here are available in Free, with up to 5 MiB per file and 10 new comparison sessions per local day. Pro supports larger files within technical safety limits and adds report export.

Your files are processed locally on your computer. They are not uploaded to a comparison service or sent to an AI model.

Clear answers

Common questions about compare two HTML files.

Does this compare the rendered web pages?

This workflow compares HTML source text with syntax highlighting. Check the page in a browser separately to review its rendered appearance.

Can I see a changed link address or alt attribute?

Yes. Both are part of the HTML source. The example shows an emptied alt value and a changed booking-link destination.

Should I always ignore whitespace in HTML?

No. Enable an ignore option only when those whitespace differences are irrelevant to your review. Keep it off when the spaces themselves matter.

Three short steps

Open both pages, set the ignore rule, inspect the edits.

  1. 01

    Choose Compare two files. Open the original HTML file first, then the edited copy. You can also drop both files into the window.

  2. 02

    Open Ignore and enable Ignore leading and trailing whitespace when you want to leave indentation out of this review.

  3. 03

    Follow the next-difference arrow. In the example, inspect five edits: heading, menu item, price, alt text and booking link.

Available for macOS and Windows

Solve it with Diff Anything.