DevUtils

Diff Checker

New

Compare two texts online and see differences highlighted — free, no signup. Side-by-side line diff with added lines in green and removed in red. Works for code, config files, JSON, or any plain text.

1 lines
1 lines
+0 added-0 removed1 unchanged1 total lines
Diff Result
11

About this tool

A diff is a comparison between two versions of a text that shows exactly what was added, removed, or unchanged. Diffs are fundamental to version control systems like Git (git diff), code review, documentation management, and any situation where you need to understand what changed between two texts. This tool compares two text blocks line by line, highlights added lines in green and removed lines in red, and shows the unchanged context. Use it to compare configuration files, code snippets, JSON blobs, SQL queries, or any two plain-text inputs.

How to use

  1. 1Paste the original (older) text into the left panel.
  2. 2Paste the modified (newer) text into the right panel.
  3. 3Click "Compare" — differences are highlighted immediately.
  4. 4Green lines (+) were added in the new version; red lines (-) were removed.

Frequently asked questions

How does the diff algorithm work?
This tool uses a longest-common-subsequence (LCS) algorithm—the same approach used by the Unix diff utility and Git. It finds the largest set of lines common to both inputs, then marks everything not in that set as either added (in the right text only) or removed (in the left text only).
What do the colors mean?
Green lines (prefixed with +) appear only in the right/new text and were added. Red lines (prefixed with -) appear only in the left/old text and were removed. Uncolored lines are present in both texts and are unchanged.
Is the comparison case-sensitive?
Yes, by default. A line with a capital letter is treated as different from the same line in lowercase. The comparison is also whitespace-sensitive: a trailing space makes two otherwise identical lines different.
Can I compare code files?
Yes—paste the file contents into each panel. The diff operates on plain text, so it works for any language: JavaScript, Python, JSON, YAML, SQL, HTML, or prose. For binary files (images, PDFs), a text diff is not meaningful.