TodayTools

Diff checker

Compare drafts of an essay, a contract or some code, and see every change at a glance.

PrivateNo uploadsRuns in your browser

Donate
View
Granularity

Business Team

For the second draft

Spot every change at a glance.

Two drafts. Prakash and his partner compare the contract.

BeforeReading both copies line by line

With sdevChanges shown in colour

  • Two business partners talking over a laptop

    Every change seen

    Each edit stands out in colour.

  • Business People

    Signed

    They sign with full trust.

How to compare two texts

  1. Paste both versions

    Put the older text in Original and the newer one in Changed. Press Open or drop a file onto either pane to load it, and use Swap to flip the two sides.

  2. Tune the comparison

    Choose Lines for code and documents, Words or Characters for short passages. Tick Ignore whitespace to skip indentation and spacing changes, Ignore case to treat A and a as the same, and Only changes to hide unchanged lines.

  3. Read the result

    Red marks removed text and green marks added text. In Lines view the changed words inside a line are highlighted, and the status line counts additions, removals and unchanged lines.

Good to know

  • Side by side shows Original and Changed in two columns with line numbers. One column shows both in a single list, with - for removed lines and + for added lines.
  • Ctrl+C (Cmd+C on Mac) with nothing selected copies the changes as text, the same as Copy changes: unchanged lines start with a space, removed lines with - and added lines with +.
  • Words and Characters mode show the two texts merged into one passage with deletions struck through and insertions marked, which suits prose and short strings.
  • Ignore whitespace collapses runs of spaces and tabs and trims line ends, so reformatting does not show up as a change.
  • The diff runs in a background worker and copes with hundreds of thousands of lines. The view is capped at 5,000 rows; tick Only changes to see just the differences in a large file.
  • Everything runs in your browser. Nothing is uploaded.

Where people use it

  • What changed in a contract

    Paste the old and new version and see every added, removed or changed word.

  • Review code changes

    Compare two versions of a file side by side with lines and words marked.

  • Check an edited essay

    See exactly what a teacher or friend changed in your draft.

  • Compare two lists

    Find names or items that are in one list but not the other.

  • Tidy both lists first

    Sort the lines so the same items line up before you compare.

    Sort lines
  • Compare two PDFs

    For PDF files, use the PDF compare tool.

    Compare two PDFs

Why this one

It works on large texts without freezing the page, and nothing you paste ever leaves your device.

  • Marks changes by line, word or letter.
  • Side by side or one column view.
  • Drop a file on either side to load it.
  • Runs in your browser, nothing is stored on a server.

What you can change

  • Compare lines, words or characters
  • Side by side or one column
  • Ignore case
  • Ignore spaces
  • Show only changes

People find this page by searching

  • diff checker
  • compare two texts
  • text compare online
  • find difference between two texts
  • compare two files online
  • compare two documents for changes
  • code compare online
  • compare two lists
Cite this tool
  • APA
    sdev.in. (n.d.). Diff checker online [Web tool]. https://www.sdev.in/tools/diff-checker
  • MLA
    "Diff checker online." sdev.in, https://www.sdev.in/tools/diff-checker.
  • Chicago
    sdev.in. "Diff checker online." https://www.sdev.in/tools/diff-checker.
  • BibTeX
    @misc{sdev-diff-checker,
      title = {Diff checker online},
      author = {{sdev.in}},
      howpublished = {\url{https://www.sdev.in/tools/diff-checker}},
      note = {Web tool}
    }

Questions people ask

Should I compare lines, words or characters?

Lines is right for code, configuration and most documents, and it still highlights the changed words inside a line. Words suits paragraphs of prose. Characters is best for short strings such as URLs or keys where a single character matters.

Why does it say changes shown roughly?

When two texts share almost nothing, the exact algorithm would take too long, so the tool falls back to matching the common start and end and marking everything between as changed. Comparing smaller sections gives a finer result.

Can I compare two files?

Yes. Press Open on each pane, or drop a file onto it, and the file's text is loaded. Any text file works: source code, JSON, CSV, logs.

Can I save or share the diff?

Press Ctrl+C with nothing selected or press Copy changes to copy the whole comparison, then paste it into a ticket, a review comment or a file. There is no share link; nothing is stored on a server.

Is my text uploaded?

No. The comparison runs in a web worker in your browser and both texts stay on your device.

Donate