# Wikinest Page Diff > Compare two versions of a page: added, removed and changed lines plus a unified diff. Compares two versions of a wiki page (or any text) line by line with the Myers algorithm, pairs replaced lines and marks the changed words inside them, counts added and removed words and writes a unified diff you can save as a patch. It is the comparison Wikinest shows in a page’s version history. Part of usefulweb.app (https://usefulweb.app/). Part of [Wikinest](https://wikinest.usefulweb.app/) (ownerApp: wikinest). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://wikinestpagediff.usefulweb.app/ (interactive tool at https://wikinestpagediff.usefulweb.app/tool) - JSON API: POST https://wikinestpagediff.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://wikinestpagediff.usefulweb.app/api/v1/tool) - OpenAPI: https://wikinestpagediff.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://wikinestpagediff.usefulweb.app/mcp - tool `wikinest_page_diff` ## Inputs - before (textarea): Older version - after (textarea): Newer version - context (integer): Unchanged lines around each change - ignoreWhitespace (boolean): Ignore spaces and indentation ## Method - Both versions are split into lines (Windows and old Mac line ends become \n). With “ignore spaces”, runs of white space inside a line become one space and lines are trimmed before comparing. - The shortest edit script between the two line lists comes from Myers’ O(ND) algorithm after removing the common start and end. Deletions directly followed by insertions are paired as changed lines. - Inside each changed pair a second Myers diff over words, spaces and punctuation marks the changed words; added and removed words are counted from those marks and from whole added or removed lines. - Similarity = unchanged lines ÷ all rows of the side-by-side view. The unified diff uses the usual @@ -a,b +c,d @@ hunk headers with the chosen number of context lines. - Wikinest merges concurrent edits with the same line diff (a diff3-style three-way merge against the version both people started from).