b2KIT

File Diff / Compare Tool

Compare two text files side-by-side or inline with syntax highlighting and diff statistics.

Tested tool guide Tested browser tools Checked August 16, 2026

What File Diff / Compare Tool does, with a checked example

This viewer answers a narrow question: where do two text files differ? Supply an earlier and later version, then inspect the changes in parallel columns or as a single inline sequence. Added, removed, and unchanged regions are visually distinguished, syntax coloring keeps source code and structured text readable, and statistics summarize the comparison. The main trap is treating syntax colors as validation. They do not establish that JSON, code, or configuration is valid; they only make the compared text easier to inspect.

Worked example

A concrete input and expected output from the current implementation.

Input

Left text:
alpha
beta

Right text:
alpha
beta

Expected output

The comparison contains 2 unchanged lines, 0 added lines, and 0 removed lines.

Both inputs contain exactly the same two lines in the same order, including the final newline. Since neither version contains unique text, the tool has no addition or removal to mark.

How the result is produced

1

Comparing the versions

Treat the left and right inputs as separate versions of one text file. The tool aligns corresponding text and distinguishes content shared by both versions from content present on only one side. Replacing a line can therefore appear as old text removed from one version and new text added in the other, rather than as a judgment about the meaning of the edit.

2

Reading the views

Side-by-side view keeps each version in its own column so corresponding regions can be scanned horizontally. Inline view places the marked changes into one reading flow. Both views express the same comparison. Syntax highlighting adds language-oriented coloring, while the diff markings identify actual changes. The accompanying statistics provide a summary, not an explanation of why the edits were made.

Good uses

  • Check a configuration file before and after a manual edit to isolate the lines that changed.
  • Compare generated JSON with a saved expected fixture when a test reports mismatched text.
  • Inspect two revisions of SQL, CSS, or source code obtained outside a version-control repository.

Limits and checks

  • This is a text comparison. It does not compare document layout, embedded images, executable behavior, or the internal structure of binary files.
  • Do not interpret the statistics as a count of logical edits. One conceptual change can remove several lines and add several replacements.
  • A textual difference does not prove a behavioral difference, and identical text does not prove that two surrounding systems use it identically.

Common questions

Can I use it to compare Word documents or PDFs?

No, not as complete documents. The tool compares text, so formatting, page layout, images, comments, and revision metadata are outside its result. You can compare text extracted from those files, but the comparison then answers only whether the extracted characters differ. It cannot establish whether the original documents look or behave the same.

Does a highlighted change mean the program behaves differently?

No. The viewer identifies textual changes and uses syntax coloring to make supported text easier to read. It does not evaluate program semantics. Reformatting may produce a visible diff without changing behavior, while a one-character edit may have a major effect. Review the marked text in the language or configuration context before drawing conclusions.

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