Text Diff

Paste two versions of text to see line-by-line additions and removals highlighted in green and red.

Runs in your browser
Original
Modified

How to Use the Text Diff Tool

  1. Paste your original text into the left panel.
  2. Paste the modified text into the right panel.
  3. Click Compare to run the diff.
  4. Review the output — added lines are shown in green, removed lines in red, and unchanged lines in grey for context.

About the Text Diff Tool

A diff tool compares two versions of a text and shows precisely what was added or removed between them. This is the same concept used by Git's git diff command, code review tools like GitHub and GitLab, and merge conflict resolvers. Common use cases include comparing two versions of a config file, checking what changed between two API responses, reviewing contract or document revisions, and debugging unexpected code changes. The diff runs entirely in your browser using a Myers diff algorithm implementation — your text is never sent to a server.

Frequently Asked Questions

How does the diff algorithm work?
This tool uses the Myers diff algorithm, the same algorithm used by Git. It finds the minimum edit distance between two sequences of lines — the smallest set of additions and deletions needed to transform the original text into the modified text.
Is there a size limit for text comparison?
There is no hard limit. The algorithm runs in your browser and can handle large documents. Very large files (tens of thousands of lines) may take a moment to process, but most comparisons are instant.
Can I compare source code files?
Yes. The tool works with any plain text content — source code, JSON, YAML, Markdown, configuration files, SQL, or any other text-based format. Paste the file contents directly from your text editor.
Are my texts stored or sent anywhere?
No. The comparison runs entirely in your browser with JavaScript. Neither the original nor the modified text is transmitted to any server or stored in any database. The tool has no backend.