Diff Checker

Compare two texts β€” split and unified view with character-level highlighting

Paste text or upload files in both panels to compare

About this tool

The Diff Checker compares two blocks of text line-by-line and highlights additions in green and removals in red, matching the familiar format of git diff output. It handles any plain text β€” code, config files, JSON, prose, or data β€” and shows the count of added and removed lines.

When to use it

  • β†’Comparing two versions of a config file to spot unintended changes
  • β†’Reviewing API response changes between environments (staging vs production)
  • β†’Checking what changed between two drafts of a document
  • β†’Validating data migrations by comparing before and after snapshots

Tips

  • β—†Paste minified JSON into the JSON Formatter first to make the diff more readable.
  • β—†Lines that changed will appear as a removal (red) followed by an addition (green) β€” there's no in-line word diff.

Frequently asked questions

What is the difference between unified diff and inline diff formats?

Unified diff (the git diff format) shows deletions and additions with - and + prefixes in a single stream with context lines. Inline diff shows both old and new text side by side, color-coding changes within each line. This tool uses the inline format for easy visual comparison.

How does this differ from git diff?

git diff compares file versions tracked by Git, with context about commits and branches. This tool compares any two plain text inputs directly β€” no Git repository or history required. It's useful for one-off comparisons where you have the two versions in clipboard or text form.

Why do I see false differences caused by line endings?

Windows uses CRLF (\r\n) line endings while Unix/macOS use LF (\n). If one version came from Windows and the other from Unix, every line appears different even if the content is identical. The fix is to normalize line endings before comparing: in VS Code, click the CRLF indicator in the status bar to convert.

Can I compare binary files or images with this tool?

No. The diff checker is for plain text. Binary files (images, PDFs, compiled binaries) contain arbitrary bytes that render as mojibake or are completely invisible when treated as text. For binary comparison you need specialized tools like file hash comparison or binary diff utilities.

Related tools

πŸ₯· ToolNinja