Compare Files Online — Free & Private

Drop two files in any combination — PDF, Word, TXT, Markdown or source code — and see every difference highlighted word by word. Everything runs in your browser; nothing is ever uploaded.

Local processing only — your files never leave your device.

No comparison yet. Paste or upload text in both fields below — results appear here automatically, and nothing is calculated until you do.

Precision:
View:

Compare your two texts

Original Text (A)
0 words

Modified Text (B)
0 words

Supported File Formats

PDF (.pdf)

Text-based PDFs are parsed with pdf.js page by page.

Word (.docx)

Microsoft Word documents are converted via mammoth.js.

Text & Code

TXT, MD, JSON, source code — loaded directly, no conversion.

Why Compare Files in the Browser?

Instant. No upload roundtrip — the diff appears as soon as the file is parsed.

Private. Sensitive contracts, NDAs and source code never leave your computer.

Free to use. No accounts, no quotas, no ads.

How SnapTextCompare works

Diff engine

Google's diff-match-patch (Apache 2.0), running in your browser. Character mode diffs raw characters; word and line modes encode tokens or lines first and diff those, then decode the result.

Similarity & importance

Similarity = 1 − Levenshtein / max(len). Importance weighs each change by category — money and dates score 90+, punctuation scores 3. Fixed rules classify a given diff; they do not determine meaning or whether an edit is safe.

Privacy

Files are read with the HTML5 File API and processed in your browser. No network request is ever made with your content — verifiable in the Network tab of your browser's DevTools. Full recent comparisons are saved in this browser's local History, even after closing the tab. Clear History to remove them.

PDF extraction uses pdf.js (Mozilla). Word extraction uses mammoth.js. Plain-text files are decoded as UTF-8. Convert other encodings first. CRLF versus LF differences remain detectable; normalise line endings in your editor if they are irrelevant.

File Comparison FAQ

Common questions about comparing files online.

Yes. SnapTextCompare lets you compare files (PDF, Word, TXT, MD, code) directly in your browser — no signup, no upload, no fee.

Text-layer PDF, DOCX, TXT, Markdown and supported UTF-8 code/data formats such as JS, TS, Python, JSON, CSV, YAML and logs. Unsupported binary files need conversion. Mixed supported formats can be compared.

No. Every comparison runs locally in your browser using pdf.js and mammoth.js — your files never leave your device.

There is no validated maximum size. Performance depends on your device and the amount of changed text; compare smaller sections if the page slows down.

Yes. Drop both PDFs into the tool and the extracted text is diffed word-by-word. For a dedicated PDF guide, see our compare PDF files page.