Compare Documents Online
Upload or paste text from PDF, Word, or TXT files and instantly see every difference. All processing happens in your browser — your documents stay completely private.
No comparison yet. Paste or upload text in both fields below — results appear here automatically, and nothing is calculated until you do.
Compare your two texts
Original Text (A)0 words
Modified Text (B)0 words
Supported Document Formats
SnapTextCompare extracts text from the three most common document formats — all processed locally in your browser with zero server uploads:
PDF Files
Text is extracted page by page using pdf.js. Works with text-based PDFs (not scanned images).
Word Documents
DOCX files are processed using mammoth.js, preserving the text structure and formatting.
Plain Text
TXT and MD files are loaded directly — no conversion needed. Perfect for code and config files.
Simply drag and drop files onto the text areas, or use the upload button. The extracted text appears instantly, ready for comparison. You can also mix formats — upload a PDF on one side and paste text on the other.
How to Compare Two Documents
Step 1: Upload your first document using the upload button or drag it onto the left text area.
Step 2: Upload the second document onto the right text area (or paste the text directly).
Step 3: The tool extracts text and highlights differences — green for added content, red for removed content.
Step 4: Switch between word and line comparison modes for different levels of granularity.
Step 5: Export the comparison results for your records.
Common Document Comparison Scenarios
Contract revisions: Compare two versions of a legal contract to verify that only agreed-upon changes were made. Word-level precision catches even minor edits.
Policy updates: HR teams and compliance officers compare policy documents to see exactly what changed between versions.
Academic submissions: Compare different versions of a thesis or paper. Track revisions from supervisors or peer reviewers.
Technical documentation: Compare API docs, README files, or technical specs between releases to ensure accuracy.
Related comparison tools
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. Deterministic on any device.
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.
PDF extraction uses pdf.js (Mozilla). Word extraction uses mammoth.js. UTF-8 with or without BOM is auto-detected; CRLF line endings are normalised to LF before diffing so cross-OS files don't appear entirely changed.
Learn More
Find Differences Between Two Documents
Quick guide to finding differences between any two documents.
Compare Word Documents Without Word
Compare .docx files without Microsoft Word installed.
The Ultimate Guide to Comparing Text
Everything about text comparison — tools, methods, and use cases.
Compare Two Text Files Online
Upload and compare text files directly in your browser.
Document Comparison FAQ
Common questions about comparing documents online.