Text Diff Checker

Compares two texts side by side, highlights the exact words that changed and folds long unchanged sections. An edited line stays next to its new version, even when lines were added nearby.

The output will appear here.
Advertisement icyabmod — admin panel included: update your website yourself, no code

How Text Diff Checker works

Compares two texts side by side, highlights the exact words that changed and folds long unchanged sections. An edited line stays next to its new version, even when lines were added nearby.

Input Two text blocks
Output Text differences
Works done 4,259

How to use it

This diff checker puts two versions of a text side by side, the original on the left and the changed version on the right, and colors every difference: changed lines red and green, removed lines red, added lines green. Inside a changed line, the exact words or punctuation that differ are marked. Lines are aligned with the Myers algorithm, and the comparison runs in your browser.

How to use the diff checker

  1. Paste the older version into the "Original text" box.
  2. Paste the newer version into the "Changed text" box next to it.
  3. Tick "Ignore whitespace differences" or "Ignore upper/lower case" if those changes do not matter to you.
  4. Click "Run tool" or press Ctrl + Enter to compare the two texts.
  5. Read the colored table, or use "Copy output" or "Download output" to keep a plain-text version.

Reading the side-by-side table

A summary line sits above the table, for example "Changed: 1 · Added: 1 · Removed: 0 lines". Each side keeps its own line numbers, so after two lines are inserted near the top, line 12 on the left sits next to line 14 on the right. The colors follow one rule throughout:

RowLeft (original)Right (changed)
ChangedRed background; the removed words in darker red, struck throughGreen background; the new words in darker green
RemovedRed backgroundEmpty, hatched cell
AddedEmpty, hatched cellGreen background
UnchangedNo colorNo color

Take a config file whose original reads timeout: 30, retries: 3, region: eu-west. In the new version the timeout is 60 and verbose: true was appended. The first row is a changed row in which only 30 and 60 are marked, the next two are plain, and the last one is green on the right with a hatched cell on the left. On a phone the two columns stack: the old line appears directly above the new one, and unchanged lines are printed once. If the texts match, you get "No difference found." instead of a table.

How the diff checker matches lines

A naive comparison pairs line 1 with line 1 and line 2 with line 2, so a single heading added at the top makes every following line look different. This tool strips the shared beginning and end of both texts and aligns the rest with the Myers algorithm, which finds the shortest list of insertions and deletions. One inserted line therefore produces one green row and nothing else.

Inside each block of edits, removed and added lines are paired by similarity: shared words, or a shared beginning or end of a word. Suppose a lease clause changes from "the 5th of each month" to "the 10th of each month" and a new sentence about late fees is inserted just above it. The new sentence shows up as an added line, while the clause sits next to its new version with only 5th and 10th marked. Lines that share nothing but occupy the same position are still placed side by side as a changed pair, with the whole line highlighted.

When two lines have no word in common, as with a one-word line containing a typo, the tool compares characters instead. recieve against receive marks only ie and ei, because the start and end match. If too little matches, as with Hello, world against Goodbye, the whole line is marked. A block that moved is the one change it cannot express as a move: it appears as removed in its old place and added in the new one.

Options, folding and copying

  • Ignore whitespace differences treats runs of spaces and tabs as a single space and ignores spaces at the start and end of a line. Indentation changes and trailing spaces then stop producing rows. A non-breaking space pasted from a web page also counts as an ordinary space.
  • Ignore upper/lower case makes "Error" and "ERROR" equal. Both options are off by default and only affect the comparison: the table always shows your text exactly as you pasted it.
  • Folding. Long stretches of unchanged lines collapse into a bar such as "42 unchanged lines hidden, click to show". Three lines of context stay above and below every change, enough to see where you are without scrolling through the whole document.
  • Unified text. "Copy output" and "Download output" produce a classic unified listing: unchanged lines start with two spaces, removed lines with - and added lines with + . A changed line becomes a minus line followed by a plus line, and folded lines are included.

Details that trip people up

  • Line endings and a BOM do not count. Windows (CRLF) and Unix (LF) line breaks are treated the same, and a byte order mark at the start of a file is ignored, so a file re-saved by another editor does not light up red.
  • A final line break does count. If only one text ends with an extra Enter, the table shows an empty line as added or removed.
  • A paragraph is one line. Word highlighting shows what changed inside a long paragraph, but the copied output repeats the whole paragraph as a minus line and a plus line. For prose, putting each sentence on its own line keeps the report short and the pairing precise.
  • Normalize structured data first. Format both JSON payloads with the JSON formatter, or both pages with the HTML beautifier, before comparing. A minified file against a pretty-printed one is a single long line against hundreds.
  • Huge inputs. With tens of thousands of differing lines or thousands of separate edits, the tool stops aligning in detail and lines up the differing region in order. Compare very large files in sections.

Everyday uses

  • Contracts and documents: see which clauses, dates or amounts the other side edited in a returned draft, without relying on their tracked changes.
  • Code snippets: compare two versions of a function, a SQL query or a config file that never went into version control.
  • Translations: put the old and new source text side by side to find the sentences that need translating again, or compare two translators' versions of the same original.
  • Lists and CSV rows: sort two exports the same way, then compare them. When 1,Lamp,20 becomes 1,Lamp,25, only the price is marked, and new records appear as green rows.

Privacy

Both texts are compared by JavaScript in your browser and are not sent anywhere; the page only increments an anonymous counter when the tool runs. That makes the diff checker suitable for drafts, internal documents and configuration files. To measure the length of either version, use the character counter, or browse more text tools.

Advertisement Kelivo — a word game by icyabmod, on Google Play and the App Store

Frequently asked questions

Paste the original into the "Original text" box and the new version into "Changed text", then run the tool. You get a side-by-side table: changed lines have a red background on the left and a green one on the right, removed lines are red, added lines are green, and the words that actually differ are marked in a darker shade. A summary above the table counts changed, added and removed lines. Identical inputs return "No difference found."

Yes. In a changed row only the differing words and punctuation are marked: darker red and struck through on the left, darker green on the right. Inside a sentence the whole word is marked even if just one letter changed. When two lines share no words at all, such as a one-word line with a typo, the tool compares letters and marks only the differing middle part, provided the start and end match well enough. Otherwise the entire line is marked.

Invisible characters are the usual cause: a trailing space, a tab replaced by spaces, or a non-breaking space copied from a web page. In the table the culprit shows up as a highlighted blank spot inside the line. Turn on "Ignore whitespace differences" and such lines count as equal. Capitalization has its own option, "Ignore upper/lower case". Line ending style, Windows versus Unix, never counts as a difference.

It is a plain unified listing of the whole comparison, one line per row. Unchanged lines start with two spaces, lines found only in the original start with "- ", and lines found only in the changed text start with "+ ". A changed line appears twice, first with a minus and then with a plus. Colors and word marks are lost in plain text, but folded lines are included in full, so the listing reads cleanly in an email, a ticket or a review comment.

The tool works with text you paste, so open each file in a text editor, copy its contents and paste them into the two boxes. Any plain-text format works: source code, CSV, JSON, Markdown, configuration files or logs. Binary documents such as PDF or Word files need to be converted to plain text first, otherwise there is nothing meaningful to compare line by line.