RevealTheme logo

Bộ so sánh văn bản (Diff)

So sánh hai khối văn bản theo từng dòng. Hiển thị trực quan các phần thêm vào, xóa đi và các dòng không thay đổi bằng mã màu.

Cách sử dụng công cụ này

  1. 1

    Paste or type the original version into the left textarea labeled Original.

  2. 2

    Paste or type the changed version into the right textarea labeled Modified.

  3. 3

    Read the result panel below: lines prefixed with a minus and shown in red were removed, lines prefixed with a plus and shown in green were added, and lines prefixed with an equals sign are unchanged.

  4. 4

    Edit either box to refine your input; the diff recomputes instantly as you type.

Bộ so sánh văn bản (Diff) là gì?

Các công cụ so sánh khác biệt (diff) đối chiếu hai phiên bản của một văn bản và làm nổi bật những gì đã thay đổi. Hữu ích để so sánh các tệp cấu hình, hợp đồng, các bản đánh giá mã hoặc bất kỳ hai phiên bản nào của một tài liệu. Công cụ này chạy hoàn toàn trong trình duyệt của bạn: không có dữ liệu nào được tải lên.

Các trường hợp sử dụng phổ biến

  • Spot which keys changed between two versions of a .env or config file pasted side by side.

  • Compare two revisions of a short paragraph or email draft before sending the edited version.

  • Check what a teammate altered in a snippet they pasted into chat versus your local copy.

  • Verify that a find-and-replace did exactly what you intended across a block of text.

  • Review line-level differences between two SQL queries or log excerpts of similar length.

  • Confirm two lists (allowlists, redirect rules, CSV rows) are identical or see exactly where they diverge.

Câu hỏi thường gặp

Có so sánh ở cấp độ từ không?
Công cụ này so sánh ở cấp độ dòng. Để làm nổi bật ở cấp độ từ, hãy dùng một công cụ chuyên dụng như Meld hoặc VS Code.

Công cụ liên quan