Text Diff

Text Diff compares two texts at line, word or character level: in side-by-side or inline view it highlights added and removed parts in color and marks the changed words inside modified lines. It can ignore case and whitespace, load files, compare JSON ignoring key order and indentation, and copy or download the result as a standard unified patch.

Before
After
Summary

+2 added · −1 removed · 3 unchanged · similarity 67%

1Merhaba dünya
1Merhaba dünya
2Bu bir örnek satır
2Bu değişen bir örnek satır
3Sabit satır
3Sabit satır
4Son satır
4Son satır
5Yeni satır

How it works

  1. 1Paste the old text into 'Before' and the new text into 'After', or open them with “Load file”.
  2. 2Choose the comparison level (line, word, character) and the view (side by side, inline, patch).
  3. 3Ignore case and whitespace if needed; turn on JSON mode when comparing JSON.
  4. 4Read the added/removed counts and similarity from the summary line; take the .diff output from the patch view.

Frequently asked questions

What is the difference between line, word and character comparison?+

Line mode shows which lines changed and highlights words inside changed line pairs. Word mode shows which words changed within a paragraph, and character mode reveals tiny differences such as typo fixes.

What does JSON mode do?+

It first puts both JSON documents into a sorted, indented form and then compares them, so differences in key order or whitespace do not count as changes. For a structural path-based diff use the JSON Compare tool.

What is a unified patch?+

The standard format used by git diff and diff -u: each change block is given with an @@ header and three lines of context. You can apply the output with `patch` or `git apply`.

How does it perform on very large files?+

The diff uses the Myers algorithm: files with tens of thousands of lines and few changes compare instantly. For huge inputs that are almost entirely different, the tool treats the region as fully replaced after about 2,500 edits.

Are my texts sent to a server?+

No, the comparison runs entirely in your browser.

Embed on your site

Size
480 × 360px
<iframe
  src="https://toolsqube.com/en/text/text-diff/embed"
  width="480" height="360"
  style="border:0;border-radius:14px"
  title="Text Diff · ToolsQube"
  loading="lazy">
</iframe>

Want to go deeper on this topic: Text Editing Guide →

Command Palette

Search for a command to run…