← Back to tools

Diff viewer

Compare text and files with syntax highlighting.

Everything happens locally in your browser. Nothing is uploaded.
Comparison Settings
Original Text
Modified Text
Diff Statistics
+0 additions-0 deletions0 changes
Diff Result
1|1
Features

View Modes:

  • • Unified diff view
  • • Split diff view
  • • Side-by-side comparison
  • • Line number display
  • • Syntax awareness

Input Options:

  • • Direct text input
  • • File upload comparison
  • • Drag and drop support
  • • Various file formats
  • • Large file support

Comparison Options:

  • • Ignore whitespace
  • • Case-insensitive comparison
  • • Context line control
  • • Line wrapping
  • • Export diff patches

A practical guide to Diff viewer

Diff Viewer compares two text inputs or files and presents additions, removals, and changed lines in unified, split, or side-by-side views. Whitespace and case settings alter what counts as a difference.

Example: review a configuration change

Load old and new files in the correct order, ignore whitespace only if it is insignificant, and inspect every changed key and value.

Task-specific steps

  1. 1

    Place the known original on the left and the modified version on the right, confirming their order and encoding.

  2. 2

    Choose a view plus language, whitespace, case, line-number, and wrapping settings appropriate to the content.

  3. 3

    Review each addition and deletion in context, then repeat without ignore options before final approval.

Options that affect the result

  • Unified, split, and side-by-side presentations suit patches, focused lines, and parallel reading.
  • Ignore-whitespace and ignore-case filters can reduce noise but may hide meaningful changes in some formats.

Limitations to know first

  • A text diff does not understand business semantics, moved code blocks, compiled behavior, or binary files.
  • Ignoring whitespace is unsafe for languages where indentation or exact spacing affects meaning.

Questions specific to this task

Why is a moved paragraph shown as deletion and addition?

Line-oriented diff algorithms often represent movement as removal from one location and insertion at another.

Should whitespace be ignored for code review?

Only when the language and change policy make whitespace insignificant; Python, YAML, and formatted data can depend on it.