Text File Diff

Compare two text files in your browser and see added, removed and changed lines highlighted in a split or unified view. Files are never uploaded. Changed characters within a line are marked too, and unchanged blocks are folded so you can focus on the differences.

About this tool

What is a diff checker?

A diff checker compares two versions of a text and shows exactly what changed between them. This tool takes two text files, for example two versions of a config file, a log, source code or a CSV export, and highlights the lines and characters that differ.

How to use

  1. Drop two text files onto the drop area, or click it to choose them. The first file is the original (left) and the second is the modified version (right).
  2. Switch between Unified and Split with the buttons or the switch between them.
  3. To swap in a different file, drop it on (or click) the box for that side. Click Clear to start over.

Features

  • Split view shows the original and modified files side by side; Unified view shows changes in a single column
  • Line and character highlighting: added and removed lines are colored, and the changed characters inside them are emphasized
  • Folded context: only three lines around each change are shown; click a folded section to expand it
  • Line numbers and file names above each side
  • Line endings ignored: CRLF and CR are converted to LF first, so a Windows and a Unix copy of the same file show no difference
  • "No difference" is shown when the two files are identical
  • Works with any plain text file: .txt, .csv, .json, .log, source code and so on

FAQ

Are my files uploaded?

No. Files are read and compared in your browser only, which makes the tool safe for private documents and code.

Can I paste text instead of choosing files?

Not at the moment. Save the text to files first and drop them onto the tool.

Why does every line show as changed?

The files probably differ in something invisible on every line, such as trailing spaces, tabs versus spaces, or the character encoding. Line ending differences (CRLF vs LF) are already ignored.

Can it compare Word or PDF files?

No. Only plain text files can be compared; binary formats such as .docx or .pdf will show unreadable characters.