08 / Text / diff-checker

Diff Checker

Compare two texts line by line, side-by-side or unified.

ReadyLocal processing
08 · Workspace

How to use

  1. 01Paste the first version of your text into Original.
  2. 02Paste the second version into Modified; the Differences panel updates as you type.
  3. 03Switch between Side by side and Unified using the Diff view control.
  4. 04Read the +added and −removed line counts in the panel header, and the line numbers next to each line.
  5. 05Press Copy unified diff to copy the changes as plain text, or Clear to empty both inputs.

What is this tool?

The diff checker compares two blocks of text line by line and highlights the lines that were added, removed or left unchanged. It works with any plain text, including code, config files, logs and API responses, and shows the result side by side or as a unified diff with line numbers. The comparison runs locally in your browser, so you can safely diff private files.

How the line-by-line diff works

The tool splits both inputs into lines and finds the longest common subsequence (LCS): the largest set of lines that appear in the same order in both versions. Those lines are marked unchanged, lines only in Original are marked removed and lines only in Modified are marked added. This is the same basic approach used by diff and git diff.

For example, comparing "line one / line two / line three" with "line one / line 2 / line three" keeps lines one and three as unchanged and reports "line two" as removed and "line 2" as added. An edited line therefore always appears as a removal plus an addition.

Comparison is exact, so differences in trailing spaces, indentation or letter case count as changes. Very large inputs (around 2,000 × 2,000 lines) are rejected to keep the browser responsive.

Side-by-side vs unified diff view

Side by side shows Original on the left and Modified on the right, pairing each block of removed lines with the added lines that replaced it. It is the easier view for reviewing edits to prose or config values.

Unified shows a single column with both line numbers, prefixing added lines with + and removed lines with −. It is compact and close to the output of git diff, and Copy unified diff produces the same layout as plain text (with "+ ", "- " or two spaces before each line) for pasting into a ticket or chat.

Getting cleaner diffs of JSON, logs and config files

Because the comparison is line based, formatting matters as much as content. Two JSON documents that are identical but formatted differently, or minified onto one line, will show as entirely changed. Pretty-print both sides the same way first, ideally with sorted keys, so only real value changes remain.

For logs, strip or normalize values that always differ, such as timestamps, request IDs and durations, before pasting. The remaining highlighted lines then point directly at the behavior that changed between the two runs.

Common use cases

  • Comparing expected and actual output from a failing test
  • Spotting changes between two versions of a config file or environment file
  • Reviewing what changed in an API response between releases
  • Checking copy or translation edits line by line
  • Comparing log excerpts from a passing and a failing run

FAQ

How do I compare two texts for differences?

Paste one version into Original and the other into Modified. Added and removed lines are highlighted immediately in the Differences panel.

Does the diff checker ignore whitespace?

No. Lines are compared exactly, so trailing spaces, indentation and case changes are all reported as differences.

Why is an edited line shown as removed and added?

The diff works at the line level, so a changed line is represented as the old line removed and the new line added. Side by side view places them next to each other.

Can I export the diff?

Yes. Copy unified diff copies every line prefixed with +, - or a space, which you can paste into a ticket, chat or document.

Is there a size limit?

Inputs of roughly 2,000 × 2,000 lines or more are rejected with an error to keep the browser responsive.

Is my text uploaded?

No. Both texts are compared locally in your browser.