Toolshub
轉換 · 在瀏覽器中執行

比較兩個大文字檔,不上傳

在瀏覽器裡比較各 10 MB 的兩個文字檔,輸出統一格式 .diff 或自包含的並排 HTML 頁。

$35 買斷 · 免費上限每檔案 10 MB· 每天 5 次免費

檔案
未選擇檔案

每個檔案不超過 10 MB,且只接受文字;全程不上傳。

在本分頁內執行,不上傳任何內容。

結果

免費方案:每檔案最多 10 MB,每次 2 個檔案,每天 5 次。這件工具單件買斷 $35,一次付款。比較價格。

授權:免費方案。

這頁與別處不同之處

線上 diff 往往意味著把檔案貼到別人的伺服器,而合約草稿、事故日誌和匯出的設定恰恰不能這麼做。這個頁面在本機讀取兩個檔案並逐列比較:先剝掉相同的首尾,再用只出現一次的列做錨點,依所選上下文回報變更。它寫出可交給 patch 的統一 diff,或給不讀 diff 的同事看的並排 HTML。

完全在分頁裡比較兩個十兆位元組檔案,同時產出統一 diff 與自包含並排頁。

範例輸入與輸出

環節 情形 體積 說明
輸入 Two versions of a config export 219 B two small YAML exports with one changed value and one toggled flag
輸出 A unified diff 230 B one hunk with three lines of context, plus a closing count of added and removed lines

這裡寫的是本頁建置時對照的示範數字,不是對每個檔案的承諾。

你可以自己核對什麼

承諾 測試結果
a single changed line in a 400-line file is one hunk, not a wall of output unit test changes line 200, asserts 199 unchanged lines are stripped from each end and exactly one hunk is produced
the side-by-side page references nothing outside itself test asserts the output starts with a doctype, contains line-number cells and no http or https reference
ignoring whitespace is a choice with three different answers test shows a trailing-space change as a difference under exact mode, ignored under trim, and inner spacing ignored under all

常見問題

以下問答目前仍為英文原文。

Why not use git or my editor?

Use them when the files are in a repository or on the same machine. This page is for the three cases they do not cover: a file you are contractually not allowed to upload, a one-off export that is not in any repository, and a comparison a non-technical colleague has to read, where a side-by-side HTML page beats a terminal.

What does each whitespace option actually ignore?

Exact compares every character, so a trailing space is a difference. Trim ignores leading and trailing whitespace, which makes a re-indented block look unchanged. All ignores whitespace inside the line too, so "foo bar" and "foobar" count as the same line; that is useful for tokenised dumps and dangerous for prose, so it is not the default.

What happens when the two files are identical?

The page says so instead of downloading an empty file. An empty diff looks like a failed run, and the line count gives you something to quote when the answer is "nothing changed".

How large a comparison is realistic?

Ten megabytes per file, and the page aborts with a clear message if the files differ in more than two hundred thousand lines. In practice the shared beginning and end are stripped first and the rest is anchored on unique lines, so a log with a handful of changed entries stays fast even when it is large.

Does it handle Word documents or PDFs?

No. Those are archives or page descriptions, not text, and a line diff of their bytes is noise. Convert to plain text first. The page also does not merge three versions or compare syntax trees; it compares lines, exactly and predictably.

價格

這件工具一次性 $35,只要工具還在就一直可用。一次付款,不是訂閱。授權存在目前瀏覽器裡,憑交易編號可在別處還原。

免費方案:每次 2 個檔案,每檔案 10 MB,每天 5 次。買斷:50 個檔案,每檔案 200 MB。

相關工具