---
title: "Diff Checker | iamthana"
description: "เปรียบเทียบข้อความสองชุดทีละบรรทัด ไฮไลต์ส่วนที่ต่างกัน และคัดลอกเป็น unified diff ได้"
canonical_url: "https://iamthana.com/tools/diff-checker"
meta:
  "og:description": "เปรียบเทียบข้อความสองชุดทีละบรรทัด ไฮไลต์ส่วนที่ต่างกัน และคัดลอกเป็น unified diff ได้"
  "og:image": "https://iamthana.com/_og/s/o_a269ccfe50104095.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Diff Checker | iamthana"
  "twitter:image": "https://iamthana.com/_og/s/o_a269ccfe50104095.png"
---

> Index of every page on this site: [llms.txt](https://iamthana.com/llms.txt)

# **Diff Checker**

เปรียบเทียบข้อความสองชุดทีละบรรทัด ไฮไลต์ส่วนที่ต่างกัน และคัดลอกเป็น unified diff ได้

ต้นฉบับ0 ตัวอักษร

ฉบับแก้ไข0 ตัวอักษร

แสดงบรรทัดที่ไม่เปลี่ยนทั้งหมด

วางข้อความทั้งสองฝั่ง ส่วนที่ต่างกันจะขึ้นตรงนี้

## **วิธีเทียบ**

เทียบทีละบรรทัดด้วยอัลกอริทึม Myers ซึ่งหาจำนวนบรรทัดที่ต้องลบกับเพิ่มน้อยที่สุด โหมดปกติแสดงบรรทัดที่เปลี่ยนพร้อมบรรทัดรอบข้างข้างละ 3 บรรทัด

คู่บรรทัดที่ถูกแทนที่จะไฮไลต์ในระดับตัวอักษร โดยตัดตามกลุ่มอักขระที่แสดงเป็นหนึ่งตัว สระและวรรณยุกต์ไทยจึงไม่แยกจากพยัญชนะ บรรทัดที่ตรงกันไม่ถึง 30% หรือยาวเกิน 4,000 กลุ่มอักขระจะไม่ไฮไลต์ในบรรทัด

## **ขึ้นบรรทัดใหม่และช่องว่าง**

ช่องกรอกข้อความของเบราว์เซอร์แปลง CRLF เป็น LF ให้ตอนวาง ไฟล์ที่ต่างกันแค่รูปแบบขึ้นบรรทัดใหม่จึงขึ้นว่าเหมือนกัน ส่วนช่องว่าง แท็บและบรรทัดว่างนับเป็นเนื้อหา ถ้าท้ายข้อความไม่มีขึ้นบรรทัดใหม่ บรรทัดสุดท้ายจะขึ้นเป็นความต่างเหมือนที่ git ทำ

ปุ่มคัดลอกให้ unified diff ที่มีบรรทัดรอบข้าง 3 บรรทัด นำไปใช้กับคำสั่ง patch ได้

## **เครื่องมืออื่น ๆ**

- [Security**★ ใหม่ล่าสุด**

  hsts ........ OK

  csp ........ MISSING

  x-frame ..... OK

  referrer .... OK<h3>**HTTP Security Header Checker**</h3>

  ตรวจ HTTP Security Headers ของ URL หรือ header ที่วางเอง พร้อมค่าที่ OWASP แนะนำให้ตั้ง](https://iamthana.com/tools/http-security-header)
- [Calculator

  1,500 W × 8 ชม.

  = 12 kWh<h3>**Simple Electricity Cost Calculator**</h3>

  เครื่องมือคำนวณค่าไฟฟ้าเบื้องต้น โดยอ้างอิงจากกำลังไฟ (Watt) และชั่วโมงการใช้งาน](https://iamthana.com/tools/calculate-electricity)
- [Developer

  3f2b8c1e-9a4d-4e7b-

  8c5a-1d6f0e2b7a94<h3>**UUID Generator**</h3>

  สร้างรหัส UUID เวอร์ชัน 1, 4, 6 และ 7 ครั้งละไม่เกิน 1,000 รายการ เลือกตัวพิมพ์ใหญ่หรือตัดขีดคั่นได้](https://iamthana.com/tools/uuid-generator)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://iamthana.com/#website","@type":"WebSite","inLanguage":"th-TH","name":"iamthana","url":"https://iamthana.com/","publisher":{"@id":"https://iamthana.com/#identity"},"workTranslation":[]},{"@id":"https://iamthana.com/tools/diff-checker#webpage","@type":"WebPage","description":"เปรียบเทียบข้อความสองชุดทีละบรรทัด ไฮไลต์ส่วนที่ต่างกัน และคัดลอกเป็น unified diff ได้","name":"Diff Checker","url":"https://iamthana.com/tools/diff-checker","breadcrumb":{"@id":"https://iamthana.com/tools/diff-checker#breadcrumb"},"isPartOf":{"@id":"https://iamthana.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://iamthana.com/tools/diff-checker"]}]},{"@id":"https://iamthana.com/#identity","@type":"Person","alternateName":"Thana Tingprasom","name":"iamthana","url":"https://iamthana.com","knowsAbout":["AI","SEO","Development","Homelab","Software Development","Python","Ubuntu","Docker"],"sameAs":["https://github.com/iamthana","https://www.linkedin.com/in/thana-tingprasom/","https://www.facebook.com/kttkook"]},{"@id":"https://iamthana.com/tools/diff-checker#webapplication","@type":"WebApplication","applicationCategory":"UtilityApplication","applicationSubCategory":"Text","browserRequirements":"Requires JavaScript","description":"เปรียบเทียบข้อความสองชุดทีละบรรทัด ไฮไลต์ส่วนที่ต่างกัน และคัดลอกเป็น unified diff ได้","inLanguage":"th-TH","isAccessibleForFree":true,"name":"Diff Checker","operatingSystem":"Any","url":"https://iamthana.com/tools/diff-checker","author":{"@id":"https://iamthana.com/#identity"},"offers":{"@type":"Offer","price":"0","priceCurrency":"THB"}},{"@id":"https://iamthana.com/tools/diff-checker#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://iamthana.com","position":1},{"@type":"ListItem","name":"Tools","item":"https://iamthana.com/tools","position":2},{"@type":"ListItem","name":"Diff Checker","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://iamthana.com/sitemap.md) for all pages.
