Skip to content

Diff checker

Compare two texts line by line, highlight what changed, and see word-level differences inside each changed line, entirely in your browser.

or drop one here
or drop one here

Comparison result

Result

Enter both texts

Paste or drop text on both sides, then click Compare.

Lines added
-
Lines removed
-
Lines unchanged
-

Differences

How it works

A diff checker compares two blocks of text line by line and highlights every removed, added and unchanged line, so you can see exactly what changed between two versions of code, config or prose.

  1. Paste or drop both texts

    Type, paste or drop a file into the original and modified fields.

  2. Click Compare

    Removed lines appear in red, added lines in green, matching lines stay plain.

  3. Switch views if you need to

    Side by side lines up both versions and underlines the exact words that changed within a line.

Inline versus side by side

Inline view lists both versions in a single column, with each removed line followed by its replacement, which is compact and quick to scroll through a large number of sequential changes. Side by side places the original and modified versions in two aligned columns and additionally underlines the specific words that changed within a modified line, which makes small, localized edits easier to spot.

Ignoring case and whitespace

Turn on Ignore case to treat uppercase and lowercase letters as identical, or Ignore whitespace differences to treat any run of spaces or tabs, and leading or trailing spaces, as identical. Both options only change which lines count as a match; the text you pasted is never altered.

Everything stays on your device

The comparison runs entirely in your browser, including text loaded from a file. Nothing you paste or drop is ever sent to a server, so it is safe to compare source code, configuration files or other confidential text.

Frequently asked questions

How do I compare two versions of code or config files online?

Paste the original text into the left field and the modified text into the right field, or drop a file onto either one, then click Compare. The tool performs a line-by-line comparison and highlights removed lines in red and added lines in green. A summary shows the total lines added, removed and unchanged.

Is the diff checker safe to use with proprietary code or secrets?

Yes. The comparison runs entirely in your browser using JavaScript, including any file you drop or choose. Neither text is sent to a server, so it is safe to compare source code, configuration files, environment variables or other confidential text.

What is the difference between inline view and side-by-side view?

Inline view shows both versions in a single column with color coding, which is compact and easy to scroll. Side-by-side view places the original and modified versions in two columns aligned by line and underlines the exact words that changed within a modified line, which makes localized edits easier to spot than inline view alone.

Can this diff tool compare files, not just pasted text?

Yes. Drop a text file onto either field, or choose one with the file picker, and its contents load straight into that field. Both fields accept plain text files such as .txt, .md, .json, .csv, .log or source code files, and the content never leaves your device.

Does this tool do word-level or only line-level diffs?

The line-by-line comparison is line-level, consistent with the standard diff algorithm. Switch to the side-by-side view to also see word-level highlighting within a changed line, which shows the exact words that were removed or added rather than only marking the whole line as different.