About Text Compare Tool
A free comparison tool that survives reordering. It runs entirely in your browser, stores nothing, and is built around one idea: content that moved should be reported as moved.
The problem it was built for
Almost every online text compare tool reads both documents strictly top to bottom. That is the right model when edits happen in place, and the wrong one the moment something moves. Relocate a paragraph, reorder two functions, or lift a config block higher in a file, and a sequential comparison reports the content twice — once as a deletion where it used to live, once as an unrelated addition where it now sits.
Nothing was lost, but the output says otherwise, and you are left reading a screen of red and green to establish that the two versions are actually equivalent. The more carefully someone has restructured a document, the worse the tool performs on it. That inversion is what this project set out to fix.
What it does differently
Instead of comparing lines, the comparison compares meaningful units. Code in a supported language is parsed into a syntax tree; everything else is split into blocks separated by blank lines, falling back to lines when the text has no such separation. Syntax units are fingerprinted twice — once exactly as written, and once with local identifiers normalised — so a function whose parameters were renamed still matches the original it came from.
Matched units are then ordered to find the longest run that stayed in sequence. Everything inside that run is in place; everything outside it moved. That single step is what separates a genuine relocation from a delete-plus-add, and it is why reordering a file here scores near-identical rather than near-zero.
Both engines remain available because there are two honest answers to what a difference is. Smart matches blocks wherever they ended up. Strict is the classic sequential comparison, for when position is exactly what you are checking. They feed one shared similarity formula, so their scores are directly comparable.
How it is built
The site is a multi-page application: every route is a separate, pre-rendered HTML document with no client-side router between them. Pages are readable before any JavaScript runs, and this one never runs any beyond the theme switch.
The comparison itself is a single interactive island on the home page. Parsing and diffing happen in a Web Worker on your own machine, so a large comparison cannot freeze the interface, and grammars are fetched only once you actually paste something — arriving on the page costs no engine download at all.
Fonts and language grammars are served from this domain rather than a CDN, which is a privacy property first and also why the page loads as fast as it does. The two third-party scripts are Google Analytics, used to count visits, and Google AdSense, which pays for what the site costs to run. Neither is ever given the text you compare — there is no path by which it could be — and the privacy policy sets out exactly what each one collects.
What it is honest about
A similarity score is a summary, not a proof. Two blocks can be textually identical and still behave differently in context, and an order-independent comparison deliberately treats a reordering as cheap — which it is for prose, and is not always for code. Where the analysis has been reduced for a very large input, the status line says so rather than presenting a quietly partial result as a complete one.
Language detection guesses, and occasionally guesses wrong; the override exists because of that. If a comparison gives you a result you believe is incorrect, it is worth reporting — those reports are the main reason the matching has improved.
Free, and staying that way
There is no account, no sign-up, no usage cap, and no paid tier holding back a feature. The tool costs almost nothing to run precisely because the work happens in your browser instead of on a server. If something is missing or wrong, get in touch — or write directly to admin@textcomparetool.com.