Skip to content

About

NavigatorsLab - Text Diff: runs free on GitHub Pages AND navigatorslab.com โ€” 100% in-browser, no uploads. MIT.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

๐Ÿ”ฌ Text Diff

Compare two texts with word-level highlights

License Privacy Offline PRs Pages Live check

โ–ถ Open it on navigatorslab.com โ€” free, no sign-up, nothing uploaded
navigatorslab.com/Text-Diff ยท ๐Ÿ”Š Watch Narrated Step-by-Step Tutorial Video ยท Watch Full Suite Hands-On Video
This repo's Pages site runs the actual tool: demo.html

Text Diff Annotated Live Usage Frame

Line diff with word-level highlights, similarity percentage, whitespace/case options, unified-diff export.

๐Ÿ“– Complete Step-by-Step User Guide

Step 1: Paste Original Text (Version A) Into the Left Pane (Original Text Editor (#textA))

  • How to do it: Paste or type the baseline version of your contract clause, code snippet, or prose into #textA.
  • Expected result: Original text is loaded in local browser memory.

Step 2: Paste Revised Text (Version B) Into the Right Pane (Revised Text Editor (#textB))

  • How to do it: Paste the updated or redlined text into #textB.
  • Expected result: Both versions are ready for Longest Common Subsequence (LCS) comparison.

Step 3: Click Compare Texts to Inspect Word-Level Highlights (Compare Button (#btnDiff) & Diff Output (#diffOut))

  • How to do it: Click Compare (#btnDiff). Inspect #diffSummary (added/removed line counts and similarity percentage) and #diffOut, where intra-line word changes are highlighted in green (.w-add) and red (.w-del).
  • Expected result: Subtle single-word edits (like 30 days โ†’ 45 days) stand out immediately.

Step 4: Export Standard Unified .diff Patch File (Download .diff Button (#btnDl))

  • How to do it: Click Download .diff (#btnDl) to save a standard unified diff file with - and + hunks.
  • Expected result: Standard .diff patch file downloaded locally.

๐ŸŽ›๏ธ UI Controls, Shortcuts & Parameters Reference

Control / Shortcut What It Does
Version A (#textA) & Version B (#textB) Side-by-side text areas for original and revised text.
Compare (#btnDiff) Runs the deterministic LCS diff algorithm with intra-line word highlighting.
Diff Summary (#diffSummary) & Output (#diffOut) Shows similarity score, added/removed counts, and color-coded word diffs.
Download .diff (#btnDl) Exports a standard unified .diff text file.

๐Ÿ’ก Pro Tips & Real-World Workflows

  • ๐Ÿ’ก Use Text Diff before signing a counter-party's 'clean final PDF' of an NDA or MSA: copy the text from your draft into #textA and the text from their PDF into #textB to catch silent edits.
  • ๐Ÿ’ก AI agents can also call this exact diff engine deterministically via POST https://navigatorslab.com/tools/mcp (text_diff tool).
  • ๐Ÿ’ก You can pre-populate inputs via URL parameters (textdiff.html?a=...&b=...).

๐Ÿงช Concrete Example: Input โ†’ Engine โ†’ Output

Stage What Happens Details
1. Raw Input Contract-v1.txt vs Counterparty-Redline-v2.txt Counterparty claims 'minor typos fixed', but changed '30 days notice' to '90 business days notice'
2. On-Device Engine Custom Longest-Common-Subsequence (LCS) line + intra-line word diff engine highlights exact token mutations Runs 100% client-side in your browser tab under strict CSP (connect-src 'none').
3. Verified Output Inline Word-Diff + Unified Patch (.diff) 91.4% similarity badge ยท '-30 +90 +business' highlighted inside line 14 ยท Exportable unified diff patch
@@ -14,1 +14,1 @@
-terminate with [-30-] {+90 business+} days written notice | Similarity: 91.4%

โœ… What it does

  • Compare two texts with word-level highlighting inside changed lines
  • Similarity percentage, whitespace/case options, unified-diff export
  • Handles code, contracts and prose alike

๐Ÿš€ Try it in 30 seconds

  1. Paste both texts
  2. Read word-level highlights and the similarity %
  3. Export a unified diff

๐Ÿ“ธ Live UI in action

Text Diff in action

๐Ÿ”’ Private by design

  • 100% on-device โ€” files are processed in your browser and never uploaded to any server
  • No accounts, no tracking, no cookies, nothing retained โ€” open the page and work
  • Works offline once loaded; fully mobile-friendly
  • Free & open source (MIT) โ€” use it at home, at work, anywhere

๐Ÿค– Built for humans and AI agents

  • Deep-linkable via URL parameters โ€” see the Agent Mode guide
  • Machine-readable catalog: llms.txt ยท llms-full.txt
  • MCP endpoint: POST https://navigatorslab.com/tools/mcp (tool catalog + deterministic text tools โ€” see the main repo)
  • No build step required to use any tool โ€” just the URL

๐Ÿ›  Under the hood

Custom LCS diff with word-level intra-line highlighting

Third-party components are catalogued in NOTICE; this repo is MIT-licensed (LICENSE).

๐Ÿ—‚ The NavigatorsLab Tools suite

The full catalog โ€” every tool in the hub with the same zero-upload promise, plus the lab's apps, CLIs and engines:

Tool What it does
๐Ÿ›ก Photo Privacy Kit Strip GPS, camera model and timestamps before posting Open
๐Ÿ” Password Breach Checker Has this password been breached? โ€” it never leaves your tab Open
๐Ÿ” Metadata & Hidden-Data Checker See what's really inside a file โ€” then strip it Open
๐Ÿ—œ Image Shrinker Hit โ€œmax 2 MBโ€ portal limits without TinyPNG Open
๐Ÿ“„ Scan & Screenshot Cleaner Phone photos of documents โ†’ clean, straight PDFs Open
โœ Local E-Sign Pad Sign this lease tonight โ€” not DocuSign Open
๐Ÿงพ Receipts โ†’ One PDF Shoebox of receipt photos โ†’ one date-sorted PDF Open
๐Ÿ”ข Receipt OCR โ†’ CSV Read totals off receipt photos, export for expenses Open
๐Ÿ”ณ QR Studio Generate QR codes and decode QR images โ€” no site sees them Open
๐ŸŽง Audio Trimmer Cut voice notes and clips on a waveform Open
๐Ÿงฎ Invoice / Quote Generator One-person shops: hours in, clean PDF out Open
๐Ÿ—‚ Batch Rename & Sort IMG_5847.jpg โ†’ 2026-09-05-receipt-home-depot.jpg Open
๐Ÿ–จ Print-Shop Prep Exact sizes, bleed, DPI checks, print-ready PDF Open
๐Ÿ“‘ PDF Pages Reorder, rotate, delete and extract PDF pages Open
๐Ÿ”ฌ Text Diff Compare two texts with word-level highlights Open
๐ŸŽจ Reimagine Redesign any HTML page from its own content Open
๐Ÿ“Š Text Stats Words, reading time, readability, keyword density Open
๐Ÿ“œ PDF Studio Edit the text inside your PDF โ€” private, free, open source Open
๐Ÿฉบ Design Health 18 deterministic design-quality checks for HTML โ€” no LLM, no API key Open
๐Ÿ”ช Skill Slice Copy one Read-verified skill folder โ€” a slice, not the pie Open
๐Ÿ•ต liecatchers Your agent said Done. Prove it โ€” ten sensors, one RECEIPT.json Open
๐Ÿ“š Book Guide MCP Ship improvements with your books โ€” agents cite, run playbooks, learn Open
๐Ÿ“ก Data Insights Founder intelligence โ€” daily & weekly tech signal briefs Open
๐Ÿช“ Iron Axe: Legacy An original side-scrolling beat 'em up โ€” Godot 4 Open

One hub, twenty-four projects: https://navigatorslab.com/tools
Source & the whole suite: https://github.com/Kayforkind/NavigatorsLab-Tools

About

NavigatorsLab - Text Diff: runs free on GitHub Pages AND navigatorslab.com โ€” 100% in-browser, no uploads. MIT.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages