---
title: "文字比對 - 以 LCS 演算法為基礎的行層級文字差異比對，標示新增與刪除的行。 - AllTools - 全能工具箱"
description: "使用最長共同子序列（LCS）演算法逐行比對兩段文字，準確找出新增行與刪除行，適合程式碼與文件的版本校對。 貼上即可處理，結果可直接複製，全程在本地端執行。"
canonical_url: "https://tool.warmday.wang/zh-Hant/text/diff"
meta:
  author: AllTools
  keywords: "線上工具箱, AllTools, 實用工具, 生活常用, 數學計算, 文字處理, 圖片處理, 開發者工具, PDF 工具, 單位換算, 免費工具, 免登入工具"
  "og:description": "使用最長共同子序列（LCS）演算法逐行比對兩段文字，準確找出新增行與刪除行，適合程式碼與文件的版本校對。 貼上即可處理，結果可直接複製，全程在本地端執行。"
  "og:image": "https://tool.warmday.wang/img/og-cover.png"
  "og:image:alt": "AllTools - 全能工具箱 Logo"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "文字比對 - 以 LCS 演算法為基礎的行層級文字差異比對，標示新增與刪除的行。"
  "twitter:image": "https://tool.warmday.wang/img/og-cover.png"
---

> Index of every page on this site: [llms.txt](https://tool.warmday.wang/llms.txt)

# **文字比對**

以 LCS 演算法為基礎的行層級文字差異比對，標示新增與刪除的行。

## **原始文字**

## **修改後文字**

## **比對設定**

**忽略大小寫**

**忽略行首尾空白**

**忽略空行**

### **使用說明**

#### **功能介紹**

使用最長共同子序列（LCS）演算法逐行比對兩段文字，準確找出新增行與刪除行，適合程式碼與文件的版本校對。

#### **操作步驟**

將原始文字貼到左側，修改後的文字貼到右側，依需要勾選忽略選項，按下比對即可查看差異結果。

#### **注意事項**

本工具為行層級比對，不細分同一行內的字元差異；如需字元層級的標示，請使用「文字差異增強」工具。超大文字比對可能需要一些時間。

## **同類工具**

同一個分類下還有這些 · 文字處理

[**顏文字大全**收錄大量可愛顏文字與特殊符號，分類瀏覽並一鍵複製，聊天、貼文與暱稱裝飾都能直接貼上使用。](https://tool.warmday.wang/zh-Hant/text/kaomoji) [**字數統計**統計文字的字數、字元數、行數與段落數，支援中英文混合與即時更新，交稿前確認篇幅是否符合限制。](https://tool.warmday.wang/zh-Hant/text/count) [**文字去重**依行移除重複內容並保留首次出現的順序，可選擇忽略空白與大小寫，整理名單與清理資料時省時省力。](https://tool.warmday.wang/zh-Hant/text/deduplicate) [**文字排序**依行排序（升冪/降冪/自然排序/隨機）](https://tool.warmday.wang/zh-Hant/text/sort) [**文字尋找取代**支援一般文字與正規表達式的尋找取代，可預覽符合項目與取代結果，批次整理文案與程式碼時很實用。](https://tool.warmday.wang/zh-Hant/text/find-replace) [**大小寫轉換**UPPER/lower/Title/Camel/Snake/Kebab/Constant](https://tool.warmday.wang/zh-Hant/text/case-converter)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://tool.warmday.wang/#organization","name":"AllTools","alternateName":"AllTools - 全能工具箱","url":"https://tool.warmday.wang/","logo":{"@type":"ImageObject","url":"https://tool.warmday.wang/img/logo.png","width":512,"height":512}},{"@type":"WebSite","@id":"https://tool.warmday.wang/zh-Hant#website","url":"https://tool.warmday.wang/zh-Hant","name":"AllTools - 全能工具箱","inLanguage":"zh-Hant","publisher":{"@id":"https://tool.warmday.wang/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://tool.warmday.wang/zh-Hant?q={search_term_string}"},"query-input":"required name=search_term_string"}},{"@type":"WebPage","@id":"https://tool.warmday.wang/zh-Hant/text/diff#webpage","url":"https://tool.warmday.wang/zh-Hant/text/diff","isPartOf":{"@id":"https://tool.warmday.wang/zh-Hant#website"},"inLanguage":"zh-Hant","name":"文字比對 - 以 LCS 演算法為基礎的行層級文字差異比對，標示新增與刪除的行。","description":"使用最長共同子序列（LCS）演算法逐行比對兩段文字，準確找出新增行與刪除行，適合程式碼與文件的版本校對。 貼上即可處理，結果可直接複製，全程在本地端執行。"},{"@type":"SoftwareApplication","@id":"https://tool.warmday.wang/zh-Hant/text/diff#app","name":"文字比對 - 以 LCS 演算法為基礎的行層級文字差異比對，標示新增與刪除的行。","description":"使用最長共同子序列（LCS）演算法逐行比對兩段文字，準確找出新增行與刪除行，適合程式碼與文件的版本校對。 貼上即可處理，結果可直接複製，全程在本地端執行。","url":"https://tool.warmday.wang/zh-Hant/text/diff","applicationCategory":"UtilitiesApplication","operatingSystem":"Web","inLanguage":"zh-Hant","isPartOf":{"@id":"https://tool.warmday.wang/zh-Hant/text/diff#webpage"},"offers":{"@type":"Offer","price":"0","priceCurrency":"CNY"}},{"@type":"BreadcrumbList","@id":"https://tool.warmday.wang/zh-Hant/text/diff#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"首頁","item":"https://tool.warmday.wang/zh-Hant"},{"@type":"ListItem","position":2,"name":"文字處理","item":"https://tool.warmday.wang/zh-Hant/text"},{"@type":"ListItem","position":3,"name":"文字比對","item":"https://tool.warmday.wang/zh-Hant/text/diff"}]}]}
```

## Sitemap

See the full [sitemap](https://tool.warmday.wang/sitemap.md) for all pages.
