UTILS.
Private by default
±

Diff Checker

Compare two blocks of text and highlight the added and removed lines.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Paste two versions of any text or code and see a line-by-line comparison with added lines in green and removed lines in red, computed with a longest-common-subsequence algorithm. Perfect for spotting edits without a heavyweight tool.

Both texts are split into lines and compared exactly, so a change in capitalisation, a trailing space or a different indent makes a line count as changed. A line that was edited appears as one removed line followed by one added line. The summary beside the button shows how many lines were added and removed.

Because the comparison builds a table with one cell for each pair of lines, memory use grows with the product of the two line counts. Files of a few thousand lines compare quickly, while files of tens of thousands of lines may be slow or fail on a small device.

Frequently asked questions

Does it compare word by word?
It compares line by line, which is the most useful granularity for code and documents. Reformat into shorter lines for finer comparison.
Is there a size limit?
It works on large inputs, but very long texts run an O(n×m) comparison, so extremely large files may be slow.
Why does an edited line show as removed and added?
The comparison works on whole lines, with no word-level highlighting. A changed line is therefore reported as the old line removed plus the new line added. Put each sentence or value on its own line to make the changes easier to read.

More tools