About this tool
When an assertion on a long string fails, the runner usually prints both values and leaves you to spot the difference. Paste the expected value on the left and the actual value on the right to see exactly what changed. Line mode suits logs, config files and feature files; word mode suits prose and error messages; character mode finds a single stray space, quote or invisible character. The diff uses the jsdiff library (the Myers algorithm, as in git) and runs entirely in your browser. Windows (CRLF) and Unix (LF) line endings are treated as equal.
How to use it
- Paste the original text (for example the expected output) on the left and the changed text on the right, or click “Load sample”.
- Choose Lines, Words or Characters, and tick “Ignore whitespace” or “Ignore case” if those differences do not matter for your check.
- Read the side-by-side or unified view, or switch to Patch to copy or download a standard unified diff.
Text Diff Checker FAQ
What does “Ignore whitespace” do in line mode?
Lines are compared after trimming both ends and collapsing runs of spaces and tabs, so indentation and double spaces no longer count as changes. Blank lines and line breaks still count.
Why do two lines look identical but show as changed?
They usually differ by an invisible character: a trailing space, a tab instead of spaces, a non-breaking space or a zero-width space. Switch to Characters mode to see it, or paste the text into the Test String Generator’s “Measure any string” box to view the escaped form.
Is the patch output compatible with git apply?
It is a standard unified diff with three lines of context and placeholder file names (original and changed). Tools such as patch accept it; for git apply, edit the file names in the --- and +++ headers to match the real path.