Text Diff Checker

Compare two texts line by line and highlight added and removed differences.

Drag and drop a file here, or

click to select

Drag and drop a file here, or

click to select

About this tool

This checker computes the minimal diff between two texts using the Myers O(ND) algorithm — the same one git uses — and renders it in the familiar visual format: removed lines in red with a «-» prefix and added lines in green with a «+» prefix. You can load text files, ignore whitespace or case differences, and copy the result as a patch. Everything is processed in the browser: nothing is sent to any server.

About this tool

This checker computes the minimal diff between two texts using the Myers O(ND) algorithm — the same one git uses — and renders it in the familiar visual format: removed lines in red with a «-» prefix and added lines in green with a «+» prefix. You can load text files, ignore whitespace or case differences, and copy the result as a patch. Everything is processed in the browser: nothing is sent to any server.

Use cases

  • Compare two versions of a code or config file
  • Review changes between API responses or documents
  • Check which lines changed after a refactor
  • Generate a patch-format diff to share

Frequently asked questions

Which algorithm does the checker use?
The Myers O(ND) algorithm, the same one used by git, computing the minimal line-by-line diff in the browser without sending data to any server.
What do the colors and the + and - symbols mean?
Red lines with a «-» prefix exist in the original text but not in the modified one; green lines with «+» were added; neutral lines are common to both texts.
What are «ignore whitespace» and «ignore case» for?
«Ignore whitespace» treats lines that only differ in the amount of spaces or tabs as equal; «ignore case» does the same for uppercase/lowercase differences. Lines are always displayed with their original text.
Is there a size limit?
Yes, each text can have up to 5,000 lines. That covers most code and config files while keeping the computation instant.

Related tools