Compare text

Paste two versions of a contract, an essay, an email or a config to see what changed between them. Changed lines are paired up and the exact words that differ are highlighted, so a moved comma or a new number stands out.

Or drop a file on either box.

   

How the comparison works

The texts are compared line by line with the Myers algorithm, the same one behind git diff and GNU diff, so the result is the shortest list of removed and added lines that turns the original into the changed text. Where a block of lines was replaced, each removed line is paired with the added line in the same position and compared word by word, so a one-word edit in a long paragraph is marked on that word instead of the whole line. When two lines have less than half their text in common, they are shown as a plain removal and addition.

We checked it against GNU diffutils on 400 random pairs of files, including files that do not end with a line break: the number of changed lines matched diff --minimal every time. Very different files stay fast because lines that appear on only one side are set aside before the search (GNU diff does the same). Two 20,000-line files with nothing in common compare in under 0.1 s. When two long files share many lines in a scrambled order, the search is cut short to stay fast, and the page tells you when that happened.

A .diff that patch and git apply accept

Download .diff saves a unified diff (the diff -u format, with 3 lines of context and \ No newline at end of file markers where needed). In the same 400-pair test, every downloaded patch applied cleanly with both patch -p1 and git apply and reproduced the changed file byte for byte. The file names in the header come from the files you opened, so you can send the patch to someone who has the original file:

patch -p1 < original.diff
git apply original.diff

If you compare with an ignore option on, lines that only differ in whitespace or case count as unchanged, so the patch keeps the original's version of them, exactly like diff -w.

Whitespace, case and line endings

Compare web pages, PDFs and images too

For two PDF versions, Compare PDFs extracts the text and shows the changed words with page numbers. For screenshots, Compare images highlights the pixels that changed. To track what changed on a live web page, the Shotmint API returns its readable text as Markdown (POST https://shotmint.creasework.com/v1/content) or a screenshot (/v1/screenshot), 1 credit each with 25 free renders a month. Scripts and AI agents can get a key with a bare POST https://shotmint.creasework.com/v1/keys/free (no body, JSON reply), then diff today's text against yesterday's.

Get 25 free renders a month API docs

FAQ

Are my texts uploaded? No. The comparison runs in your browser and this page sends nothing to a server, so it is safe for contracts, code and configs with secrets.

How large can the files be? Tens of thousands of lines work well: a 30,000-line file with 5% of its lines edited compares in about 0.1 s. The table shows at most 20,000 rows; turn on Only changes for longer results, or download the .diff.

Can it compare JSON? Yes: JSON diff sorts the keys and re-indents both documents first, so key order and formatting don't show up as changes.

Related tools: Diff checker, Compare two text files, JSON diff, Compare PDFs, Compare images, JSON formatter, HTML formatter.

Related tools

Compare Two Text Files · Compare images (diff) · Compare PDFs (text diff) · Add text to image · PDF to text · Image to text (OCR) · Add text to PDF · Hex to text / text to hex · Text to Hex Converter · Screenshot to Text · JPG to Text · Extract Text from Website · Extract Text from Image · all free tools