1001Ferramentas
📝 Dev

Text Diff

Compare two texts and see the differences highlighted line by line. Useful for reviewing documents and code.

How does it work?

Behind the diff sits the LCS (Longest Common Subsequence) algorithm. In the output, green flags what was added while red flags what was removed.

Compare two texts side by side

Finding what changed between two versions of a document, contract or snippet of code wears your eyes out. An extra comma here, a line that vanished there. This tool compares the two texts and highlights the differences character by character, or word by word if you tick the box, making clear what came in and what went out.

It pays off when you're reviewing edits before approving a text, checking what a collaborator changed, comparing answers or diffing two versions of a config file. Rather than reread everything, you go straight to the parts that actually moved.

The comparison happens entirely in the browser. The texts go to no server, which makes it safe to confront confidential content. Paste the two versions and the result shows up right away.

Frequently asked questions

What is the difference between the default mode and the compare word by word option?
By default the tool lines up the two texts character by character, so a single accent or a stray comma shows up. Tick the word by word box and it compares whole words split on whitespace instead, which reads far better on long prose and runs much faster. The counter under the result follows whichever mode you picked.
Why does the page stall on very long texts?
The diff runs the LCS algorithm, which builds a grid with one cell for every pair of tokens. Two texts of 5,000 characters each mean 25 million cells, and the browser tab crawls. Switching to word by word cuts the token count roughly sixfold; for whole files, compare a few paragraphs at a time.
Does the comparison ignore capitals, accents or extra spaces?
No. Tokens are matched exactly, so House and house count as a change, as does an accent or one extra space. There is no option to ignore case or whitespace. The output keeps the original spacing and line breaks, which means an indentation change in code or in a config file stays visible.

Related Tools