No upload, 100% local, no account

Text Diff

Paste two texts to compare them line by line. Added lines are green, removed lines are red. Nothing leaves your browser.

How Text Diff works

The text diff tool compares two blocks of text line by line and highlights which lines were added, removed or unchanged. Additions appear in green and deletions in red, in a single stacked view with the line numbers of both texts in the gutter. The comparison runs instantly in the browser the moment both input areas contain text, and nothing you paste is transmitted to any server.

The comparison is a longest-common-subsequence diff over whole lines, the same family the Unix diff utility belongs to: it finds the largest set of lines the two texts share, and everything else is an insertion or a deletion. The output reads like a unified diff, which is familiar if you already read git diff output.

How to use Text Diff, step by step

  1. Paste the original text into the left (or top) input panel.
  2. Paste the modified text into the right (or bottom) input panel.
  3. Read the highlighted diff: green lines are additions, red lines are deletions.
  4. Read the result from top to bottom: unchanged lines carry both line numbers, added and removed lines only their own.

Common use cases

  • Compare two versions of a configuration file to confirm which keys were added or removed during a deployment.
  • Review a colleague's edited documentation draft against the original to spot deletions before accepting the changes.
  • Verify that a code generator produced the expected output by diffing its result against a known-good reference file.
  • Audit changes to a legal clause across two contract versions by diffing the paragraphs as plain text.

Frequently asked questions

Is my text sent anywhere when I paste it in?

No. The diff algorithm runs as JavaScript in your browser tab, processing only the text you have pasted into the two panels. Neither panel's content is ever transmitted to Sunasty or any third party. If you want to verify this, open your browser DevTools, navigate to the Network tab and paste your text: no outbound request appears.

What algorithm does the diff use?

A longest-common-subsequence diff computed over whole lines, the family the Unix diff utility comes from. It keeps the largest set of lines common to both texts and reports everything else as an insertion or a deletion.

Can I diff by character rather than by line?

The primary comparison is line-by-line. Within changed lines, the tool additionally highlights the specific words or characters that differ, so you can see the fine-grained change within a modified line without needing a separate character-level mode.

Is there a size limit on the text I can compare?

There is no enforced limit. In practice, very large inputs (above a few thousand lines) may take a moment to compute in the browser. If you are diffing files that large, a command-line tool like diff or git diff is likely more appropriate.

Can I copy the diff output?

Yes, the copy button above the output copies the displayed diff as plain text with added lines prefixed by "+" and removed lines prefixed by "-", following the standard unified diff format.