██████╗ ██╗███████╗███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗███████╗██████╗ ██╔══██╗██║██╔════╝██╔════╝ ██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝██╔════╝██╔══██╗ ██║ ██║██║█████╗ █████╗ ██║ ███████║█████╗ ██║ █████╔╝ █████╗ ██████╔╝ ██║ ██║██║██╔══╝ ██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ ██████╔╝██║██║ ██║ ╚██████╗██║ ██║███████╗╚██████╗██║ ██╗███████╗██║ ██║ ╚═════╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
Diff Checker — compare text, code, documents and images online
Diff Checker — frequently asked questions
What is a diff checker?
A diff checker (also called a text compare tool) puts two versions of something side by side and highlights what changed: which lines were added, removed, modified or moved. This one compares text and code, prose documents, CSV and spreadsheet data, JSON, and images, and it does it in your browser rather than on a server.
Is this diff checker completely free?
Yes — everything on this page, with no limits, no account and no ads. That includes the parts other tools reserve for paid plans: syntax highlighting, a live comparison while you type, unlimited character-level diffs, document and spreadsheet comparison, exports and the merge builder. There is no server bill behind it, because the comparison happens on your own machine.
Is my data safe and private?
Yes. Every comparison — text, Word and Excel text extraction, images, exports — happens in JavaScript inside your tab. There is no back end that could receive your content, and you can verify it: open your browser's network tab and watch it stay empty while you work. Only two things ever touch the network, both optional and both without your content: the page itself, and pdf.js when you compare a PDF.
What file types can I compare?
Anything that is text: source code, config files (YAML, JSON, XML, .env), Markdown, logs, SQL, CSV. On top of that, the tool extracts and compares the text of .docx, .odt, .xlsx, .ods, .pptx and .pdf files, and compares images (PNG, JPEG, GIF, WebP, AVIF) pixel by pixel. Formatting, fonts and tracked changes inside Office files are not compared — only the text they contain.
What do the five modes do?
- Text / code — line-by-line, with syntax highlighting and character-level marks inside changed lines.
- Prose — sentence-by-sentence, ignoring where lines wrap; the result reads like a redline and prints cleanly.
- Table / CSV — both sides are parsed as a table and matched row by row, with the changed cells coloured.
- JSON — both sides are re-formatted (optionally with keys sorted) and every structural change is listed by path.
- Images — swipe, side-by-side or a pixel-difference mask, with the share of differing pixels.
How do I compare two Word documents?
Drop a .docx on each side, or use the File buttons. The text of the document — paragraphs, headings, table text, headers and footers — is extracted in your browser and compared. Switch to Prose mode for a sentence-level redline, which is usually what you want for a contract, and use Export → Print for a PDF of the result. A .docx is a ZIP archive, and the browser's own decompression API opens it, so the document is never uploaded. Formatting and tracked changes are not part of the comparison.
How do I compare two PDFs?
Drop a PDF on each side. The text layer is extracted with Mozilla's pdf.js — the same engine Firefox uses — which is downloaded from a public CDN the first time, and then the comparison is ordinary text diffing, best read in Prose mode. Scanned PDFs with no text layer cannot be compared this way, because there is no text to extract; you would need OCR first. Page images and layout are not compared.
How do I compare two Excel files or CSV exports?
Drop .xlsx, .ods or .csv files and the tool switches to Table mode. Cells are read into a grid and compared cell by cell. By default rows are matched in order; pick an id column under table and rows are matched on that value instead, so a row that moved is recognised rather than reported as one deletion and one insertion. Formulas are compared by their last calculated value, not by the formula text, and formatting is ignored.
How does the image comparison work?
Both images are drawn onto a canvas and compared pixel by pixel in your browser. Swipe drags a divider across the two, side by side shows them next to each other, and difference mask paints every differing pixel red. The tolerance slider sets how large a per-channel difference has to be before a pixel counts as changed, which is useful for JPEG artefacts. If the two images have different dimensions, the smaller one is compared against the top-left corner of the larger.
What happens to my files when I drop them here?
They are read with the browser's FileReader, kept in memory for as long as the tab is open, and never sent anywhere. Office files are unpacked locally with DecompressionStream. Closing or reloading the tab discards everything.
What is the difference between split and unified view?
Split view shows the original on the left and the modified text on the right, aligned line by line — ideal for side-by-side comparison. Unified view shows both versions in a single column with + and - prefixes, similar to git diff output — great for reviewing changes sequentially or pasting into a PR.
What is the inline redline view?
A single flowing column where removed text is struck through in red and added text follows in green, the way a lawyer's redline or Word's "track changes" print looks. It is the default in prose mode and is the most readable view for documents; split and unified views remain better for code.
Does it highlight syntax?
Yes, and it is free here. The language is detected from the content — JavaScript/TypeScript, Python, JSON, YAML, HTML/XML, CSS, SQL, shell, the C/Java/Go/Rust family, INI/.env, Markdown and diff files — or you can pick one in the syntax dropdown. Colours sit underneath the red and green change marks, so you keep both. Turn it off with plain (no syntax colours) for very large comparisons.
What are character-level diffs, and how is word-level different?
When a line is changed rather than purely added or removed, this tool can highlight exactly what differs inside that line. Character granularity marks the precise characters that changed (great for code, where red → blue should highlight just those letters). Word granularity marks whole words instead, which reads more naturally for prose and long sentences. Off just shows the whole line as changed, with no inline highlighting.
What does the Similarity percentage mean?
The share of units that are identical: lines in text mode, sentences in prose mode, rows in table mode, pixels in image mode. 100% means the two sides match. It is a quick way to gauge how substantial an edit was before reading the whole comparison.
What does "Context only" do?
It hides unchanged lines that are far from any difference, showing only a few lines of context around each change — the same idea as git diff's default output. Useful for large files where you only want to see what actually changed, not the entire unchanged body of the document.
Can I search within the diff results?
Yes. Use the search bar above the diff output to find text anywhere in the rendered comparison — matches are highlighted and the ▲/▼ buttons jump between them. Handy for jumping straight to a specific function name or line in a long diff.
How do I jump between changes?
Use Prev and Next, or press p and n. The counter shows which change you are on. The narrow strip to the right of the result is a map of the whole comparison — each mark is a change, coloured by type; click anywhere on it to jump there.
Can I print the comparison or save it as a PDF?
Yes — Export → Print / save as PDF. The print stylesheet hides the editors, buttons and FAQ and prints just the comparison on a white background, which is what you want to attach to an email or a file note. Export also offers a self-contained HTML report you can send as a single file.
What does "Ignore whitespace" do?
It ignores differences in spaces, tabs, and indentation entirely when comparing lines. Useful when comparing code that's been reformatted or re-indented by a linter, where only the actual content matters, not the whitespace around it.
What does "Ignore case" do?
It compares text case-insensitively, so Hello and hello are treated as identical. Useful for comparing content where capitalization is inconsistent but not meaningful to what you're checking.
What's the difference between "Ignore whitespace" and "Trim trailing spaces"?
Trim trailing spaces only removes whitespace at the end of each line before comparing — useful for editors that silently strip trailing spaces on save. Ignore whitespace is broader: it collapses all whitespace differences anywhere in the line, including indentation and multiple spaces between words.
What does "Detect moved lines" show?
When a line (or block of lines) was deleted from one place and an identical line reappears elsewhere, this tool marks both as moved (shown in purple) instead of a plain removal plus addition, with a small “moved to/from line N” hint. This avoids the common diff-tool confusion where reordering a list looks like every item was rewritten.
Why does the whole file show as changed when I only reformatted it?
Usually one of two things: a change in indentation style (tabs vs spaces), or every line being re-wrapped by a formatter. (Mixed line endings aren't a concern here — browsers normalize CRLF/LF automatically, so this tool never sees them as a difference in the first place.) The Suggestions panel flags whitespace, case, and indentation mismatches automatically when detected, with a one-click option to enable the relevant setting (like Ignore whitespace) and re-run the comparison.
Myers or patience — which algorithm should I pick?
Myers (the default) is the algorithm behind git diff: it finds the shortest edit script, which is usually what you want. Patience anchors on lines that appear exactly once on both sides and only then fills in the gaps. When blocks or functions have been reordered, or when a file has many similar lines such as } or blank lines, patience tends to produce a diff that matches how a human would describe the change. Switching algorithms never changes the content — only how the changes are grouped.
What do "ignore blank lines" and "ignore comments" do?
Ignore blank lines stops added or removed empty lines from counting as changes, which is handy after a reformat. Ignore comments strips //, #, -- and /* … */ before comparing, so a line whose only change is in its comment shows as unchanged. Both affect the comparison, never your text: nothing is rewritten.
Why do my re-wrapped paragraphs show up as changes?
Because in text mode a line is the unit, and re-wrapping moves words between lines. Switch to Prose mode: it joins wrapped lines back into paragraphs and compares sentences, so re-flowing text produces no changes at all and only genuine edits are highlighted.
What are the suggestions it gives me?
After running a comparison, this tool analyzes the result and surfaces plain-language observations you might otherwise miss: whitespace-only or case-only changes, mismatched line endings, an indentation style mismatch, moved blocks, or an unusually high proportion of changed lines. Where relevant, a suggestion includes a one-click button to apply the fix and re-diff.
What is the Merge builder?
Click Merge builder after running a diff to build a combined result line by line. Every difference gets A / B buttons so you can pick the original or modified version for that specific line (defaulting to the modified version), while unchanged lines are kept automatically. The merged text updates live and can be copied or downloaded — useful for resolving a diff by hand without a full merge tool.
What can I export?
A unified patch with proper @@ hunk headers (so git apply accepts it), a self-contained HTML report, a Markdown summary for a pull request or ticket, a JSON list of the changes for a script, and a print view for PDF. In JSON mode the Markdown and JSON exports list changed paths instead of lines.
Does the merge builder handle the whole file?
Yes. Every change gets a row where you pick A, B, both or neither; unchanged lines are kept automatically. All A and All B set every row at once as a starting point. The merged text updates as you click, and you can copy it, download it, or push it into the Modified pane to keep comparing from there.
Does it remember past comparisons?
Yes, in your own browser's local storage — never on a server. The History panel lists recent comparisons, and a click restores both sides. If you would rather leave no trace, untick keep history in this browser in that panel: the list is cleared and nothing further is written.
Can I compare files from my computer?
Yes. Click Load file on either side to select a file, or use Paste to pull directly from your clipboard. Any plain-text file works — code, config, log, CSV, JSON, and so on — and it's read entirely in your browser, never uploaded.
Can I share a diff with someone?
Three ways. Copy patch puts a standard unified diff on your clipboard, ready for a pull request or a ticket. Export gives you that patch as a file, a self-contained HTML report, a Markdown summary or a JSON list of changes. Share link builds a URL that carries both texts compressed in the fragment — the part after #, which browsers never send to any server — so the recipient opens exactly your comparison without anything being stored anywhere.
Can I compare via a URL, for scripts or AI agents?
Yes. ?a=…&b=… with URL-encoded text loads both sides and compares them, and ?mode=text|prose|table|json, ?view=split|unified|inline, ?lang=js and ?sample=code|prose|csv|json set the rest. Query strings are visible to whatever server hosts the page, so for real content prefer the Share link button, which uses the # fragment instead.
What keyboard shortcuts are available?
Ctrl/⌘+Enter compares, Ctrl/⌘+S downloads the patch, n and p (or j and k) jump to the next and previous change, / focuses the search box, and Tab inside a text box inserts a real tab instead of moving focus.
How does this compare to Diffchecker.com or Meld?
Diffchecker is the best-known web diff tool. Its free plan covers basic text comparison but meters or reserves several things for its paid plan — per their pricing page in September 2026, that includes syntax highlighting, the real-time editor, unlimited character-level diffs, folder comparison, exports and an ad-free view, and files are uploaded unless you buy the desktop app. Meld and WinMerge are excellent desktop tools, but you have to install them and they do not open in a browser tab. This page gives you the web convenience with the desktop privacy: everything runs locally, nothing is metered, and nothing is uploaded.
Does it work with large files?
Comfortably for typical source files and documents — thousands of lines. Cost grows with the number of differences rather than with file size, so a large file with few changes stays fast, while two large and almost entirely different files take longer. For very large comparisons, switch off compare as I type, turn on only changes, and set highlighting to line level.
Does it work offline?
Yes, once the page has loaded. Diffing, syntax highlighting, document text extraction, image comparison, merging and exports are all plain JavaScript in the page. The single exception is PDF comparison, which downloads Mozilla's pdf.js from a CDN the first time you use it; every other format — including Word and Excel files — is unpacked by the browser itself.
Is there a size limit?
No fixed limit — the practical ceiling is your browser's memory. Files of a few megabytes and tens of thousands of lines work; beyond that, switch off compare as I type and use only changes. Character-level highlighting on extremely long single lines is capped automatically so the page cannot freeze.
Does it work on a phone?
Yes. The two panes stack, and the unified or inline views are the ones to use on a narrow screen — split view needs the width. Files can be dropped or picked from your phone's storage in the same way.
Free online diff checker — compare text, code, documents, spreadsheets and images
Paste two versions of anything and every addition, removal, change and moved line is highlighted instantly. The comparison runs in JavaScript inside your own tab: no upload, no account, no quota, no ads. That matters when the thing you are comparing is a contract, a production config or code you are not allowed to send to a third party.
Five comparison modes
- Text / code — classic line diff with syntax highlighting, character-level marks inside changed lines, moved-line detection and split, unified or inline views.
- Prose — compares sentence by sentence and ignores where lines happen to wrap, so a re-flowed paragraph is not reported as a rewrite. This is the mode for contracts, policies and articles, and it prints as a clean redline.
- Table / CSV — parses both sides as a table (comma, semicolon, tab or pipe), matches rows on a key column you choose, and colours the individual cells that changed.
- JSON — re-formats and optionally sorts keys on both sides so formatting never counts as a change, and lists every structural difference by path, such as
$.limits.rps. - Images — swipe, side by side, or a pixel-difference mask, with the percentage of pixels that differ and an adjustable tolerance.
Compare Word, PDF and Excel files without uploading them
Drop a .docx, .odt, .xlsx, .ods, .pptx or .pdf file on either side and its text is extracted in the browser and compared. Office files are ZIP archives, so they are unpacked with the browser's own decompression API — nothing is sent anywhere. PDFs use Mozilla's pdf.js, which is fetched from a public CDN the first time you compare one; everything after that stays local. Formatting, images and tracked changes are not compared — this is a text comparison, and it is deliberately honest about that.
How the comparison works
Lines are compared with Myers' O(ND) diff algorithm, the same family of algorithm behind git diff. You can switch to patience diff, which anchors on lines that appear exactly once on both sides — it usually produces a more readable result when functions or blocks have been reordered. Inside a changed line, a second pass compares characters or words so you see exactly which part changed. Moved-line detection pairs an identical removal and addition and marks them as a move rather than as a rewrite.
Ignore what you do not care about
Whitespace, letter case, trailing spaces, blank lines, comments, and (in prose mode) punctuation can each be ignored. A line that only changed inside a comment, or a file that was only re-indented, then compares as identical. The tool also spots these cases for you: if the two sides differ only by trailing spaces, line endings, a byte-order mark or letter case, it says so and offers the one-click fix.
Take the result with you
Copy a real unified patch with @@ hunk headers that git apply understands, download a self-contained HTML report, a Markdown summary for a pull request or ticket, or a JSON list of changes for a script. Print gives you a clean PDF of the comparison. Share links keep the text in the part of the URL after #, which browsers never send to a server.
How it compares to other diff tools
| Feature | This tool | Diffchecker.com | text-compare.com | Draftable (free online) |
|---|---|---|---|---|
| Text & code comparison | ✓ free, unlimited | ✓ free | ✓ free | ✓ free |
| Syntax highlighting | ✓ free, 12 language families | ~ paid plan | ✗ | ✗ |
| Compares while you type | ✓ free | ~ paid plan | ✗ press a button | ✗ upload first |
| Character-level marks inside a line | ✓ free, unlimited | ~ metered on the free plan | ~ word level | ✓ |
| Word, PDF, Excel and PowerPoint text | ✓ free, in your browser | ~ metered on the free plan | ✗ | ✓ free, uploaded |
| CSV / table comparison with a key column | ✓ free | ~ metered spreadsheet view | ✗ | ✗ |
| JSON comparison ignoring key order | ✓ free | ✗ | ✗ | ✗ |
| Image comparison | ✓ free | ✓ free | ✗ | ✗ |
| Merge builder | ✓ free | ✗ | ✗ | ✗ |
| Patience algorithm option | ✓ free | ✗ | ✗ | ✗ |
| Exports: patch, HTML, Markdown, JSON | ✓ free | ~ paid plan | ~ e-mail the result | ~ PDF report |
| Account needed | ✗ never | ✗ for the basics | ✗ | ✗ |
| Your content stays on your machine | ✓ always | ✗ unless you buy the desktop app | ✗ sent to their server | ✗ uploaded |
Checked on 17 September 2026 against each tool's own pages — Diffchecker pricing, text-compare.com, Draftable. Plans and features change; check for yourself before relying on this.
Common uses
- Review code changes before committing, or compare two versions of a file outside a repository
- Redline a contract, policy or proposal and print the result
- Diff configuration between environments —
.env, YAML, JSON, Terraform - Compare two CSV exports and find the rows and cells that moved
- Check API responses, database dumps or translation files
- Spot the pixel that changed between two screenshots or exported assets
Privacy
Your text never leaves your browser. There is no back end to send it to: open the network tab and it stays empty while you work (the only exception is the one-time pdf.js download when you compare a PDF). Comparison history is stored in your own browser's local storage and can be switched off and cleared in the History panel.