Compare text or documents

Most tools read top to bottom, so a relocated text shows up as a deletion. This one keeps the blocks recognisable, therefore the logic is reported as a move, not a rewrite.

Try an example:

How the comparison works.

01

It detects the language

A fast keyword pass narrows the candidates, then the shortlist is trial-parsed and whichever grammar produces the fewest errors wins. You can always override the choice.

02

It compares structure, not line numbers

Code is parsed into a syntax tree; everything else is split into paragraph blocks, or lines when there are none. Each syntax unit is hashed twice — once literally, once with local variable names normalised — so identical logic matches even after a rename.

03

It works out what actually moved

Matched units are ordered to find the longest run that stayed in sequence. Everything in that run is in place; everything outside it moved. That is what separates a relocation from a delete-plus-add.

Five categories

Every category carries an icon and a gutter marker as well as a colour, so the result stays readable without relying on the red/green distinction.

  • UnmodifiedPresent on both sides, same place.
  • AddedOnly in the modified text.
  • DeletedOnly in the original.
  • MovedSame content, different position.
  • ModifiedMatched, then edited. Shows a similarity score.

Smart comparison

Matches blocks wherever they ended up. Reordering a file scores near 100% similar, because nothing was actually lost.

Strict comparison

Classic sequential comparison, top to bottom, with word-level highlighting inside changed lines. Use it when position itself is what matters.

Specialized Comparison Tools

Dedicated diff tools tailored for specific file formats and privacy requirements.

Compare text and find the differences.

What a text compare tool does

A text compare tool takes two versions of the same content and shows you precisely what changed. Paste the original into the left panel and the revised version into the right, and the comparison marks every difference between them: what was added, what was deleted, what was edited in place, and — unusually — what simply moved elsewhere.

That last category is where most online text compare tools struggle. A conventional comparison reads both documents strictly top to bottom, so a paragraph you relocated is reported twice: once as a deletion where it used to be, and again as an unrelated addition where it now sits. Nothing was actually lost, but the result says otherwise, and you are left reading a wall of red and green to work out that the content is intact.

How to compare two texts and find the differences

Drop your text into both panels and the comparison runs on its own — there is no compare button to hunt for and nothing to configure first. Results appear side by side, aligned so matching content sits on the same row, with a gutter marker and an icon on every changed line and a similarity score summarising how close the two versions are overall.

Inside a line that was edited rather than replaced, the specific words that differ are highlighted, so a single changed number in a long line of configuration is immediately visible instead of being buried in a row marked simply as modified. You can swap the two sides if you pasted them the wrong way round, load one of the two worked examples to see how the output reads, or drag a file straight onto a panel instead of pasting.

Case sensitive and case insensitive comparison

By default, capitalisation counts. Value and value are different things in code, in environment variables, and in anything where a name has to match exactly — so a difference you can see in your own text is one the comparison reports. Switch Case sensitive off when it is not significant: comparing two drafts of the same prose, a sentence that got recapitalised after a rewrap is not a change worth flagging, and hiding it brings the edits that matter forward. The setting applies to both comparison engines and takes effect immediately.

What makes the comparison accurate

Accuracy here means matching content the way you would read it, not the way a line counter would. Code in a supported language is parsed into a syntax tree, and everything else is split into blocks separated by blank lines, so the units being compared are meaningful ones rather than arbitrary lines. Syntax units are fingerprinted twice — once as written, once with local variable names normalised — which is why a function you renamed the parameters of is reported as a move rather than a rewrite.

Two engines are available because there are two honest answers to what a difference is. Smart matches blocks wherever they ended up, so reordering a file scores near-identical. Strict is the classic sequential comparison, top to bottom, for when position itself is what you are checking. Both feed one shared similarity formula, so their scores are directly comparable.

Comparing two documents rather than two blocks of text

The two things you need to compare are often files rather than text you can select. Drop a Word .docx or a PDF straight onto a panel, or use the Open file button on it, and the text is extracted in your browser and loaded in place. Nothing is uploaded, which is the part that matters when the two documents are a contract, a policy, or a patient record. The two files need not share a name or an extension, and you can compare a .docx against a PDF, or either against pasted text.

Formatting is deliberately discarded. A comparison that tracks changes inside the document — Word's own Compare, or version history in Google Docs — is the better tool when a restyled heading or a new table column is the thing you are checking. What you get here instead is every wording change on one screen, compared in paragraph blocks rather than line by line, so a paragraph that was rewrapped does not read as a rewrite and a section you relocated is reported as a move. The one case that cannot work is a scanned PDF, because a scan is an image of text with no text layer to read.

Free, private, and nothing to install

The tool is free to use, with no account, no sign-up, and no cap on how many comparisons you run. Because comparison happens in a Web Worker inside your own browser rather than on a server, your text never leaves your machine — which matters when the two things you are comparing are a contract, a patient record, or an internal configuration file. There is no desktop text compare software to install and nothing to keep updated.

It handles plain text and prose, Markdown, and configuration formats, with full syntax awareness for JavaScript, TypeScript, TSX, Python, JSON, CSS and HTML. Very large inputs step down gracefully rather than hanging, and the status line always says when part of the analysis was skipped, so you are never shown a quietly reduced result that looks complete.

Common use cases for text and file comparison

Different workflows require diffing for different reasons. Developers and DevOps engineers use text comparison to inspect code patches, API payloads, JSON structures, SQL scripts, and configuration files without staging files into version control. Writers, translators, and editors compare article drafts, essays, and translations to audit editorial revisions and track subtle rewording across drafts.

Legal and compliance teams rely on document comparison to review contracts, non-disclosure agreements, and terms of service, where every omitted clause, altered deadline, or added obligation carries substantial impact. Data analysts and operations teams also use it to compare exported CSV lists, spreadsheets, and server logs to spot missing records, changed timestamps, or duplicate entries in seconds.

Side-by-side visual diff and similarity scoring

Unlike raw command-line diff tools that output unified text patches in a single combined stream, a side-by-side comparison displays the original and revised text in synchronized dual columns. Matching lines remain horizontally aligned, while additions, deletions, moves, and modifications are highlighted with clear visual indicators and color coding.

When a line is edited, intra-line word-level highlighting pinpoints the exact characters or words that were altered so you do not have to scan the entire line manually. An integrated similarity percentage metric quantifies how closely the two inputs match overall, making it easy to gauge whether a revision represents minor polishing or a major rewrite.

Questions.

How can I compare two texts?

Paste the original into the left panel and the changed version into the right. The comparison runs as you type — there is no compare button — and shows the two texts side by side with matching content aligned on the same row. Additions, deletions, edits and moved blocks each get their own marker, and a similarity score above the result tells you how close the two versions are overall.

How do I compare two text files?

Drag each file onto a panel, or use the Open file button on it, and the contents load in place — or open the files yourself and paste. Nothing is uploaded: the file is read in your browser, so comparing two files here does not send them anywhere. Any text file works, whatever its extension — .txt and Markdown, source code in any language including .cpp, .c, .h, .java, .py, .go, .rs, .sql and .sh, plus JSON, YAML, CSV and configuration files. Word .docx files and PDFs work too, with their text extracted in the browser as they are dropped. The two files do not need the same name or extension. A scanned PDF is the one case that cannot work, because a scan is an image of text with no text layer to read.

How can I compare two documents side by side?

Put one version in each panel and the result is laid out as two aligned columns, so corresponding content sits on the same row and you read the difference across rather than scrolling between two windows. Where a block was relocated, a connector links its old and new position, and inside a line that was edited the specific words that changed are highlighted.

Is this text compare tool free?

Yes. The tool is completely free, with no sign-up, no account, and no limit on how many comparisons you run. There is no paid tier holding features back.

What is the free tool to compare text files?

This one is free with no account or install, and there are other good free options: Diffchecker and Text Compare in the browser, Meld and WinMerge as desktop applications, and "git diff" or the "diff" command if you already work in a terminal. What varies most between them is whether they can recognise relocated content — a plain sequential comparison reports a moved paragraph as a deletion plus an unrelated addition.

Is there a document comparison tool?

Several, and the right one depends on what you need from the answer. Word's built-in Compare feature and Google Docs' version history track changes inside the document itself, keeping the formatting, which is what you want if a restyled heading or a new table column is the thing you are checking. This tool takes the other approach: drop a .docx or a PDF on a panel and its text is extracted in your browser, then compared in paragraph blocks. Formatting is discarded, and what you get in exchange is the whole set of wording changes on one screen, including passages that were relocated rather than rewritten.

What is the best file comparison tool?

There is no single best one; it depends on what you are comparing. For merging code with version-control integration, Beyond Compare, Meld and WinMerge are the established choices. For a quick side-by-side check with nothing to install, a browser tool is quicker. What is worth checking before you trust any of them is how they handle reordered content, since a sequential comparison reports a moved block as two unrelated changes and scores near zero on a document that is fully intact.

What is file comparison?

File comparison is the process of examining two files to identify exactly where their contents differ. A comparison tool aligns the parts that match and reports the rest as added, deleted or changed, usually with a summary of how similar the two files are. It answers a narrower question than "are these the same?" — it tells you precisely what changed and where, which is what you need to review an edit or track down when something broke.

What is text comparison?

Text comparison is the process of analyzing two pieces of text side by side to identify exactly where they match and where they differ. Rather than just checking if two texts are identical, a comparison tool aligns corresponding sections and highlights additions, deletions, modified words, and moved blocks so you can easily review changes between drafts, documents, or code.

How to compare texts in English?

The same way as any other language: paste both versions and read the aligned result. For natural language the unit of comparison is the paragraph block rather than the single line, so a reworded sentence is reported as one edited paragraph with the changed words highlighted inside it, instead of as a whole rewritten block. It is not English-specific — any language that uses spaces between words behaves the same way.

What is the best way to compare two things?

Put them side by side, line up the parts that correspond, and decide in advance which differences actually matter to you — otherwise every trivial variation competes for attention with the ones that count. For two versions of a text, that is exactly what a diff tool automates: it aligns the matching content for you and marks only what genuinely differs, so you are reading a short list of changes rather than two full documents.

Does my text get uploaded?

No. Parsing and comparison run in a Web Worker in your browser, and there is no endpoint here to receive your text. The requests the page does make are for the page itself, the language grammar file the first time you compare a given language, Google Analytics, which counts the visit, and Google AdSense, which pays for hosting. None of them is ever given the text you compared, because the text is never sent anywhere at all.

Can I compare text without it being case sensitive?

Yes. Switch Case sensitive off and capitalisation differences are ignored, so a recapitalised sentence does not read as a change. It is on by default, because Value and value are genuinely different things in code and in anything where a name has to match exactly. The setting applies to both the Smart and Strict engines.

Which languages get structural comparison?

JavaScript, TypeScript, TSX, Python, JSON, CSS and HTML are parsed into syntax trees. Anything else — Markdown, plain prose, and code in any other language — is compared in blocks separated by blank lines, or line by line when the text has no blank-line separation. That still detects reordering, just without syntax awareness: a relocated block is reported as a move, but a renamed identifier inside it is not recognised as a rename.

How is the similarity percentage calculated?

Matched content counts in full, edited content counts in proportion to how similar it is, and added or deleted content counts as zero — all weighted by size, so a relocated 50-line function matters more than a moved one-liner. Both engines use that one formula, which is why the same documents can score high in Smart mode and low in Strict: one measure, applied to two different notions of a match.

More about this site.

How the comparison works and who builds it, how to get in touch, and exactly what happens to the text you paste.