📊

Text Diff Checker

Paste two texts to see exactly what changed, line by line. Added lines are green, removed are red.

Original
Modified
Diff Output
Enter text in both fields and click Compare
Advertisement
About this text diff checker

The Text Diff Checker compares two blocks of text side by side and highlights exactly what changed — added lines in green, removed lines in red, and unchanged lines in neutral — so you can spot every difference at a glance without reading both versions word for word.

Paste the original text in the left pane and the modified version in the right, and the tool lines them up using a longest-common-subsequence algorithm — the same approach behind the Unix diff command and code-review tools. Instead of a flat character dump, it aligns matching lines and only marks the parts that genuinely differ, then numbers each side independently so you can trace a change back to its exact line in either version. A summary strip tallies how many lines were added, removed, and left untouched, giving you an instant sense of the scale of an edit. It works on prose and on code alike — JavaScript, Python, CSS, SQL, YAML, JSON, HTML, or any other text-based format pastes in cleanly, and whitespace, indentation, and letter case are all preserved exactly so nothing is silently normalised away. People use it to:

Everything runs locally in your browser — neither block of text is uploaded to any server, so it is safe for confidential documents, proprietary code, private API responses, or sensitive legal text. There are no file-size caps, no accounts, and no limit on how many comparisons you run, and you can swap the two panes or load a sample at any time to see how the highlighting behaves.

How to use
  1. Paste the original text in the left pane and the modified version in the right pane.
  2. Click Compare, or just wait — the diff runs automatically a moment after you stop typing.
  3. Read the highlighted output: green lines were added, red lines were removed, neutral lines are unchanged.
  4. Check the summary strip to see how many lines were added, removed, and left untouched.
  5. Use Swap to flip the two sides, or Clear to start over with a fresh comparison.
FAQ

The tool uses a line-by-line LCS (longest common subsequence) algorithm up to 800 lines per side, with a fast hash-based fallback for very large inputs.

No. The comparison runs locally in your browser — neither input is transmitted to any server.

Yes — paste any text-based content (JavaScript, Python, JSON, YAML, plain prose, configs). Whitespace and case are preserved exactly.

This tool compares text line by line. Each whole line is treated as a unit and marked added, removed, or unchanged, so a single edited word shows up as the old line removed and the new line added rather than highlighting the individual word inside the line. Line-level diffing keeps the output clean and easy to scan, which is ideal for comparing documents, configs, and source code where lines are the natural unit of change.

Green lines were added in the modified text on the right, red lines were removed from the original on the left, and neutral lines are unchanged between the two versions. A plus sign marks added lines and a minus sign marks removed ones, and each side keeps its own line numbers so you can find any change in either version. The summary strip above the output tallies the total added, removed, and unchanged line counts.

Yes. Paste the old version of a function, file, or snippet on the left and the new version on the right, and the diff shows every changed line the same way a pull-request review would — without needing to commit or push anything. It handles any text-based language, including JavaScript, Python, CSS, SQL, YAML, JSON, and HTML, and because everything runs locally in your browser your proprietary code never leaves your device.

No — the comparison is exact. Indentation, trailing spaces, blank lines, and letter case are all preserved and treated as significant, so two lines that differ only in spacing or capitalisation are reported as a change. This is deliberate: for code and structured data those differences often matter. If you want to ignore them, normalise the whitespace or case in both texts before pasting them in.