Text and Code Diff Tool

Compare two versions with changes in red and green

Compare two versions of text or code and highlight the differences in color. Additions are marked in green, and deletions are marked in red with a strikethrough. Paste the old version on one side and the new one on the other, then choose how to compare. Word mode is suitable for contracts, documents, and plain text, highlighting changes within the line. Line mode is ideal for code and configuration files, marking entire lines that changed. A counter next to the button shows the number of added and deleted segments. The comparison runs in the browser, and your text is never sent to a server or saved.

Frequently asked questions

Can I compare by words or by lines?

Yes. Word mode is the default and suits plain text, while line mode is better for code. After switching modes, click compare again.

Why is a whole line highlighted when only one character changed?

That is line mode. It compares line by line, so even a single changed character flags the entire line. To see the exact change, switch to word mode.

Can I compare Word or PDF files?

Not directly. The tool works on pasted text, so you need to copy the content from each document and paste it into the appropriate side.

What are the numbers next to the compare button?

The number of added segments in green and deleted segments in red. A segment can be a single word or a sequence of several words or lines that changed together.

Is my text saved or sent to a server?

No. The comparison happens in your browser and nothing is saved. Refreshing the page empties both boxes.

More tools you might need

All tools in Developers and AI