novair Back to Novair Watch
Novair WatchWeb page diff

How to compare two web pages for differences

Two versions of the same page, a week apart: what was added, what was removed? Comparing the HTML source answers badly. Comparing the visible text, line by line, answers well.

Compare the visible text, not the HTML

The HTML source of a page changes at every visit: scripts, tracking parameters, class names generated by the build, a date at the top. A diff of two sources is full of noise. Extract the text a reader sees, one line per paragraph or table row, then compare line by line, and the real change stands out.

Online, in your browser

  1. Open the page, press Ctrl+U (View page source on a Mac: Option+Cmd+U), select all and copy.
  2. Paste it into “Before” in the free web page diff; do the same with the newer version in “After”. You can also open two saved .html or .txt files.
  3. Click Compare. Added lines are in green, removed lines struck through; in a changed line, the changed words stand out. “Ignore dates and times” is on by default.

Open the free web page diff

Your text stays in the page: the comparison runs in your browser, and the page is not allowed to make network requests.

With a few lines of Python

For two saved files, the standard library is enough. This keeps the visible lines and prints a unified diff:

import difflib, re

def visible_lines(path):
    text = open(path, encoding="utf-8").read()
    text = re.sub(r"<(script|style)[^>]*>.*?</\1>", "", text, flags=re.S)
    text = re.sub(r"<[^>]+>", "\n", text)
    return [line.strip() for line in text.splitlines() if line.strip()]

for line in difflib.unified_diff(visible_lines("terms-old.html"), visible_lines("terms-new.html"),
                                 "before", "after", lineterm="", n=0):
    print(line)

On the two sample pages of the online tool (fictitious terms of service), it prints:

--- before
+++ after
@@ -3 +3 @@
-Last updated: 6 November 2026
+Last updated: 12 November 2026
@@ -7,2 +7 @@
-7.3 Refunds are processed within 5 business days.
-7.4 We notify you 30 days before any change to these fees.
+7.3 Refunds are processed within 10 business days.

Note the first change: only the “Last updated” date moved, yet it is reported. Masking dates before comparing, as the online tool and Novair Watch do, removes that noise.

Common pitfalls

  • Dates and relative times (“12 Nov 2026”, “14:05”, “5 minutes ago”) change at every visit: mask them, or every comparison finds a change.
  • Pages built by scripts after loading: the source holds little of what you see. Copy the text from the page itself instead. Most of this page is built by its scripts after loading: Novair Watch tells you so when you start watching one.
  • Counters, view counts and session ids look like changes. Ignore numbers, or watch only the area you need.
  • Reordered blocks: a line-by-line comparison shows a move as one removal and one addition.
  • Signed-in pages: a version saved while signed out is a different page. Compare two versions seen the same way.

When you compare the same page every week

Copying the source by hand works once. To be told when the page changes, Novair Watch checks it for you in Firefox or Chrome, from every 5 minutes to once a day, and shows this same view as soon as it changes. Unlimited pages, no account; Pro keeps every version, dated, and compares any two.

Frequently asked questions

Can I compare two pages from their addresses?

Not in the online tool: a web page can't read another site's page from your browser without a server, and the tool has none. Paste the source, or let Novair Watch fetch the page, the way your browser opens it.

How large can the pages be?

Up to 10 MB each in the online tool, as in the extension.

Are my pages sent anywhere?

No. Both the online tool and the extension compare in your browser.

Let the page be compared for you

Novair Watch watches the whole page or just the area you pick, in Firefox and Chrome, and shows what changed. Free, unlimited pages, no account; Pro keeps every version, dated, and alerts you only when your condition is met.