Text Diff Checker

Paste two versions of a text and see exactly what was added and removed.

How to use

What it checks and how it works

The comparison uses the jsdiff library, an implementation of the Myers O(ND) difference algorithm, which finds the shortest list of additions and removals that turns one text into the other. By lines, the result is written in the unified format described in the POSIX diff specification, with three lines of context around each change. By words or characters, changes are marked inline: [-removed-] and {+added+}. A diff shows differences, not meaning: moving a paragraph reads as one removal and one addition. Line mode ignores only the spaces at the start and end of a line, not spaces inside it.

What is the difference between line, word and character mode?

Line mode suits files and lists. Word mode suits edited prose, and character mode shows small changes such as a typo or a changed digit.

Does it work for Arabic?

Yes. Arabic is compared as Unicode text, and the output follows the direction of the text. A small spelling change, such as hamza on an alef, shows as a change.

Can I compare code or JSON?

Yes, as text. Format both versions with the JSON formatter first so that spacing differences do not drown out real changes.

Sources

Related tools

Privacy

Runs in your browser; nothing is uploaded. The interactive tool needs JavaScript.