/

Compare Files / Diff Checker

Processed Client Side

Compare two files or blocks of text line by line. Upload files or paste the contents, and see exactly what was added, removed, and changed — with word-level highlighting inside every edited line.

Original (top) · Changed (bottom)
OriginalLength: 234Lines: 14Size: 234 BytesCursor: 1:1
ChangedLength: 278Lines: 15Size: 278 BytesCursor: 1:1
Differences
+1 added−0 removed~4 changed67% same
1
{
1
{
2
"name": "checkout-service",
2
"name": "checkout-service",
3
⚠
"version": "1.4.0",
3
⚠
"version": "2.0.1",
4
"private": true,
4
"private": true,
5
"scripts": {
5
"scripts": {
6
⚠
"dev": "vite",
6
⚠
"dev": "vite --host",
7
"build": "vite build",
7
"build": "vite build",
8
⚠
"test": "vitest run"
8
⚠
"test": "vitest run --coverage",
9
+
"lint": "eslint src"
9
},
10
},
10
"dependencies": {
11
"dependencies": {
11
⚠
"react": "^18.2.0",
12
⚠
"react": "^19.0.0",
12
"zod": "^3.22.4"
13
"zod": "^3.22.4"
13
}
14
}
14
}
15
}
Original: 14 lines · Changed: 15 lines · 10 unchanged. Copy exports a unified diff patch.

Bookmark this tool now — skip the search next time you need it.

About Compare Files / Diff Checker

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

Compare two files or two blocks of text and see exactly how they differ — which lines were added, which were removed, and which were edited in place. Inside every edited line it goes a level deeper and highlights the individual words that changed, so a one-character version bump does not read as a whole rewritten line. Use it to review a change before committing it, to spot config drift between two environments, or to find what actually differs between two versions of a document.

Key features

  • Compare by uploading two files, dragging files onto either pane, or pasting the contents directly
  • Line-level diff using the Myers algorithm — the same minimal-edit approach Git uses
  • Word-level highlighting inside changed lines, so you see the exact edit and not just the line
  • Side-by-side and unified views, plus an "Only differences" mode that hides unchanged lines
  • Nav Bar minimap of the whole comparison — every change shows as a coloured band you can click to jump to, like the Notepad++ Compare plugin
  • Previous / Next change buttons that step between change blocks instead of scrolling to hunt for them
  • Full-width Compare view for reviewing large files, with change markers (⚠ changed, + added, − removed) in the margin
  • Long lines wrap inside their column by default, so wide files never force you to scroll sideways
  • Ignore case and ignore whitespace options for comparisons that should not care about formatting
  • Live stats — lines added, removed, changed, and an overall similarity percentage
  • Copy the result as a standard unified diff patch, ready to paste into a review or apply as a patch
  • Runs entirely in your browser — your files are never uploaded to a server

How to use it

  1. Load the original version: click Upload original, drag a file onto the top pane, or paste the text in.
  2. Load the changed version the same way in the bottom pane.
  3. Read the differences on the right — green is added, red is removed, and edited lines show the changed words highlighted.
  4. Use Previous / Next change to step between edits, or click a coloured band on the Nav Bar to jump straight to that part of the file.
  5. For a bigger view, click Compare view to open the two files full width; press Esc to come back.
  6. Switch between Side by side and Unified, or turn on "Only differences" to hide the unchanged lines.
  7. Click Copy to export the comparison as a unified diff patch.

Tips & common mistakes

  • Turn on "Ignore whitespace" when comparing code that was reformatted or re-indented — it stops indentation changes from flooding the diff with noise.
  • Turn on "Ignore case" when comparing config keys, CSV headers, or SQL that differs only in capitalization.
  • Use "Only differences" on large files: it keeps three lines of context around each change and collapses the rest, exactly like a code review view.
  • Lines wrap by default so you can read a wide file without scrolling sideways. Turn "Wrap lines" off when you want one line per row and strict column alignment — the pane then scrolls horizontally instead.
  • Lines are matched by content, so a moved block shows as one deletion and one addition rather than a move.
  • Files are read locally with the browser FileReader API — nothing is uploaded, so it is safe to diff private config, credentials, or proprietary source.
  • To clean up a list before comparing it, strip repeated lines first with Remove Duplicate Lines.

Related tools

Browse all 8 Text tools

Frequently asked questions

10

Upload each file with the Upload buttons, drag a file onto either pane, or paste the contents in directly. The tool immediately compares them line by line and shows every added, removed, and changed line — no sign-up, and the files never leave your browser.

Yes. Both panes are ordinary editors, so you can paste text into either side and compare it just like an uploaded file. You can also mix the two — upload one file and paste the other side in.

No. Files are read locally in your browser with the FileReader API and the entire comparison runs client-side in JavaScript. Nothing is transmitted anywhere, so it is safe to diff private config files, credentials, or proprietary source code.

Side-by-side shows the original on the left and the changed version on the right, aligned line for line — best for reading an edit in context. Unified stacks the changes in a single column with - and + markers, the same layout as a Git patch or a pull-request diff.

Yes. Toggle "Ignore whitespace" to treat lines that differ only in indentation or spacing as identical — useful after a reformat. Toggle "Ignore case" to ignore capitalization differences. Both affect only the comparison; the original text is always displayed as you entered it.

Yes. When a line is edited rather than added or deleted outright, the tool runs a second word-level diff inside that line and highlights only the words that actually changed, so a small edit does not look like a full line rewrite.

Yes. The Copy button on the results pane exports the comparison as a standard unified diff patch, with @@ hunk headers and three lines of context — the same format as git diff, so you can paste it into a review or apply it with the patch command.

Any text-based file — source code, JSON, YAML, CSV, .env, logs, Markdown, or plain text. The diff is line-based and format-agnostic, so it works with any language. Binary files such as images or PDFs cannot be compared meaningfully.

This tool works the same way, without installing anything. Click Compare view to open both files full width with change markers in the margin (⚠ changed, + added, − removed), Previous / Next change buttons to step between edits, and a Nav Bar minimap down the right-hand side showing where every difference falls in the file. Click any band on the Nav Bar to jump straight to it.

Use the Previous change and Next change buttons — they step from one change block to the next, so a three-line edit counts as one stop rather than three. The Nav Bar on the right maps the whole comparison at a glance: click anywhere on it to jump to that part of the file.