1001Ferramentas
🔍 Utilities

Side-by-Side Text Diff

Compare two texts in two columns, highlighting added, removed and modified lines. Visual diff based on a simplified Myers algorithm.

Line-level diff in two columns

Two versions of the same contract, the same .env file or the same landing page copy, and the question is always what changed. Paste one version into each box and the comparison shows up below in two aligned columns. Red is a line that exists only in text A, green is a line that exists only in B, and grey is filler that keeps both columns at the same height.

Matching works on whole lines and uses the longest common subsequence between the two lists of lines. The side effect that confuses people: there is no modified state. A line you edited shows up as a red line on one side and a green line on the other, at different heights, because to the algorithm they are two different lines. Matching is literal too, so one trailing space or a changed indent already counts as a change.

Cost grows with the product of the two line counts, so think dozens or a few hundred lines. Pasting two five-thousand-line logs will freeze the tab. Very long lines wrap and knock the neighbouring column out of alignment, so zoom out or shorten them first. There is no file upload, no copy button and no ignore-whitespace option. On the other hand nothing leaves the browser: the text is never sent to a server.

Frequently asked questions

Does it ignore whitespace differences?
No. Lines are compared character by character, so one extra space is enough to mark the line as different.
Can I compare two files?
Only by pasting the contents of each. There is no upload field, and large files make the comparison heavy.
Does my text reach a server?
No. The comparison runs in the page JavaScript, which makes the tool usable for contracts or code under an NDA.

Related Tools