📝

Text Diff

Side-by-side row-level LCS diff that highlights additions and deletions, with stats and merged copy.
Diff 📂 Developer 👤 ToolWorld 🏷️ v1.1.12
Loading...
Original (old)
Modified (new)
Original (old)
Modified (new)

How to Use

📖 Tool Introduction


Text Diff is an online comparison tool built on the longest common subsequence algorithm, designed to help you see exactly which lines changed between two pieces of text. You simply paste the original text into the left box and the revised text into the right box, then click the compare button. The tool runs a dynamic-programming pass line by line to find the common ground between the two contents, paints the lines that exist only in the old text in red, paints the lines that exist only in the new text in green, and keeps the unchanged rows aligned across the two columns. This side-by-side layout is ideal for reviewing code changes, comparing two versions of a document, checking the difference between configuration files, or confirming exactly which paragraphs an edit touched. A summary bar on top counts the added lines, the removed lines and the unchanged lines, so you always know the scale of the change at a glance. Once the comparison is ready you can copy the merged result in one click, which is the full revised text, or download it as a plain text file. All of the computation happens inside your browser, no network request is made, which makes the tool a good fit for confidential source code and internal documents. The interface ships in Simplified Chinese, Traditional Chinese and English, works smoothly on both desktop and mobile, and offers a Ctrl+Enter shortcut to fire a comparison without touching the mouse. Because the algorithm is exact and deterministic, the same two inputs always produce the same highlighted view, which makes the result easy to trust and easy to share with teammates who need to understand what changed. The line numbers on each side help you jump straight to the relevant spot when you later reopen the original files.

✨ Key Features


  • Row-level compare: LCS dynamic programming pinpoints every added, removed and kept line
  • Side-by-side highlight: old on the left, new on the right, additions in green and deletions in red
  • Counts: live totals of added, removed and unchanged lines
  • Merged export: copy or download the full revised text in one click
  • Shortcut: Ctrl+Enter runs the comparison quickly without the mouse
  • Runs locally: pure front-end math, works offline, code never leaves the browser

📝 How to Use


  1. Paste the original text before the edit into the left box
  2. Paste the revised text after the edit into the right box
  3. Click Compare Diff to see the two-column highlighted result
  4. Read the top summary for added, removed and unchanged line counts
  5. Copy the merged result or download the revised text

⚠️ Notes


  • Whole-line granularity: changes are compared per line, so partial edits inside a line are highlighted for the whole line
  • Empty input: when both sides are empty the tool shows a friendly message instead of failing
  • Large text: very long documents are best split into parts to keep rendering smooth
  • Merged result: copy delivers the full new text, not a diff patch file
  • Privacy: everything is processed locally and nothing is uploaded

Related

⏫︎