b2KIT

Text Diff Checker

Compare two text blocks side-by-side with character-level and line-level diff highlighting.

Tested tool guide Tested browser tools Checked August 16, 2026

What Text Diff Checker does, with a checked example

The left and right panes hold your two text blocks, and every difference between them is marked twice: rows where the lines differ are flagged, and within each flagged row the exact changed characters are highlighted, so an edit shows as a small, precise mark rather than a whole line. The comparison is byte-for-byte. Trailing spaces, tabs, and CRLF versus LF line endings all count as real changes, which is the surprise most users hit: text that looks identical can render as a full-file difference when the two sides came from different editors or platforms.

Worked example

A concrete input and expected output from the current implementation.

Input

Left (original):
Hello world
This is a test

Right (changed):
Hello world
This is a test!

Expected output

Row 1 shows 'Hello world' on both sides with no highlight. Row 2 is marked as changed on both sides. The right-hand line 'This is a test!' carries a character-level highlight on the trailing '!' marking it as added; the left-hand line 'This is a test' shows no character-level mark, because none of its characters were removed.

The two lines differ by exactly one appended character, so the line-level pass flags only the second row and the character-level pass inside that row isolates the difference to the final '!'. Every other character matches, so nothing else is highlighted.

How the result is produced

1

Two-pass granularity

The tool shows the two blocks in aligned rows and flags every row whose lines differ, then highlights the exact changed characters within each flagged row, so the mark lands on the edit itself instead of the whole line. Rows that match exactly stay unmarked, which keeps large files readable when only a few lines changed.

2

What counts as a change

Every byte is significant: case, spacing, punctuation, and line endings all count. Content present in the right block but not the left is marked as added; content present in the left but not the right is marked as removed. Swapping the two inputs flips which side carries the additions, so the output always describes a left-to-right change.

Good uses

  • Review an edited file before committing: paste the last committed version on the left and your working copy on the right to see exactly which lines and characters changed, including edits you did not intend to make.
  • Verify a find-and-replace or automated transform: confirm the bulk edit touched exactly the intended occurrences and left the rest of the text byte-identical.
  • Locate the drift between two near-identical strings - log lines, config values, or API responses - to find the single field or character that differs.

Limits and checks

  • Line endings: text copied from a Windows editor (CRLF) compared against macOS or Linux text (LF) can render as fully changed even when the content is the same. Normalize both inputs to the same line-ending style before comparing.
  • Unicode look-alikes: visually identical text can differ by code point, such as composed versus decomposed accents or curly versus straight quotes. The character highlight exposes them, but they may not be the difference you were looking for.
  • Direction: additions are marked on the right and removals on the left, so pasting the inputs in the wrong order shows every change reversed. Decide which block is the original before pasting.

Common questions

Does the tool upload my text anywhere?

No. The comparison runs entirely in the browser tab and the text never leaves the page, so pasting code, config, or other sensitive content is safe. Nothing is stored or transmitted, and closing the tab discards everything, which makes the tool usable for confidential snippets you would not paste into a server-side service.

Why does my whole file show as changed when I only edited one line?

The usual cause is invisible whitespace: trailing spaces, tabs where the other side has spaces, or CRLF versus LF line endings. The character-level highlight on a changed line reveals these extra characters. Normalize line endings and strip trailing whitespace from both inputs, then compare again.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools