Document & File Tools

Text File Comparator

Drop an original and a changed file to see exactly what differs. Added lines are shown in green and removed lines in red with their line numbers in each file. Whitespace, case and line-ending differences can be ignored, files that differ only in encoding or line endings are recognised, byte-identical files are confirmed, and the result can be downloaded as a standard unified .patch file.

  • Runs in your browser
  • No sign-up
  • Free to use
Original file
    Changed file
      ABLine

      How to use Text File Comparator

      1. Drop the original file on the left.
      2. Drop the changed file on the right.
      3. Choose what to ignore and whether to show unchanged lines.
      4. Read the differences or download the patch.

      Text File Comparator features

      Line-by-line diff

      Added, removed and unchanged lines with line numbers.

      Ignore options

      Spaces and tabs, upper and lower case, line endings.

      Hidden differences

      Detects encoding, BOM and line-ending-only changes.

      Byte check

      Confirms when files are byte-for-byte identical.

      Patch export

      Unified diff format for git apply and patch.

      Private

      Files are compared in your browser.

      When to use Text File Comparator

      • Comparing two versions of a configuration file.
      • Checking what changed in an exported data file.
      • Reviewing edits to a document saved as text.
      • Finding out why two seemingly identical files are not equal.

      Text File Comparator FAQ

      How is this different from the Text Diff Checker?

      The Text Diff Checker compares pasted text. This tool compares files, detects their encodings and line endings, checks byte-level identity and works with large files.

      What does “ignore line-ending differences” do?

      Windows files use CRLF and Unix files LF. With the option on, a file converted between the two is not reported as changed on every line.

      Why does it say the files differ only in encoding?

      The text is the same but the bytes are not, for example UTF-8 versus UTF-8 with a byte-order mark, or UTF-16. Some programs treat these as different files.

      What is a .patch file?

      A unified diff, the format used by git and the patch command. It lists the changed lines with context and can be applied to the original to produce the changed file.

      How large can the files be?

      Up to 50 MB each. Very different files show the first 5,000 lines of the comparison; the patch contains everything.

      Are my files uploaded?

      No. The comparison runs in your browser.

      Comparing text files

      Knowing exactly what changed between two versions of a file is a daily need: configuration files on two servers, data exports from two days, a document before and after editing. Line-based comparison, the approach behind git diff, shows which lines were added and removed and leaves the rest alone, which makes even large files easy to review.

      The comparison uses the Myers diff algorithm through the jsdiff library, the same approach used by most version-control tools. Each file is first decoded with encoding detection, so a UTF-16 file can be compared with a UTF-8 one by content. Lines are numbered separately for each file, which helps when jumping to a change in an editor.

      Some differences matter only to machines. Line endings differ between Windows and other systems, and converting a file can change every line without changing any visible text. Byte-order marks and encodings work the same way. The tool reports these cases explicitly instead of showing a wall of changes, and ignoring line endings is on by default.

      Other differences can be ignored on request. Ignoring spaces and tabs helps with re-indented code or reformatted data, and ignoring case helps with SQL or configuration keys whose capitalisation changed. When nothing remains after ignoring, the tool says so; when the files are byte-for-byte identical, that is confirmed separately.

      The comparison can be exported as a unified diff, the standard patch format. It can be attached to a ticket, reviewed in any diff viewer, or applied with git apply or patch to reproduce the change elsewhere. Files never leave your device.

      Other useful tools