텍스트 비교 강조 도구
단어 수준, 문자 수준 또는 줄 수준 diff 강조 표시로 두 텍스트를 비교하세요.
이 도구에 대해
두 텍스트를 붙여 넣으면 변경된 내용을 즉시 확인할 수 있습니다. 단어 수준, 문자 수준, 줄 수준 diff 모드 간에 전환하세요. 추가된 내용은 녹색으로, 삭제된 내용은 빨간색 취소선으로 강조 표시되며 유사도 점수가 표시됩니다.
사용 방법
- 1 1단계: 왼쪽 패널에 원본 텍스트를 붙여 넣거나 입력하세요.
- 2 2단계: 오른쪽 패널에 새로운/수정된 텍스트를 붙여 넣거나 입력하세요.
- 3 3단계: diff 모드(단어, 문자 또는 줄)를 선택하세요.
- 4 4단계: 인라인 또는 나란히 보기로 강조 표시된 diff를 확인하고 통계 요약을 검토하세요.
What a text diff actually computes
Comparing two pieces of text is not as simple as walking them side by side and flagging the first character that differs — that would mark everything after a single inserted word as "changed." A proper diff finds the longest common subsequence (LCS): the largest set of pieces that appear, in the same order, in both versions. Whatever is left over on the original side was deleted, and whatever is left over on the new side was added. This tool implements that LCS algorithm directly, so it identifies the smallest real set of insertions and deletions rather than a naive position-by-position mismatch.
Three granularities: line, word, and character
The same text can be compared at three levels, and choosing the right one is the difference between a useful diff and a noisy one:
| Mode | Compares | Best for |
|---|---|---|
| Line | whole lines split on newlines | Code, config files, logs — anything line-structured |
| Word | words and the whitespace between them | Prose, edited paragraphs, copy revisions |
| Character | every single character | Spotting a one-letter typo or a changed digit |
Word mode is the most common choice for everyday text because it keeps unchanged words intact and highlights only the words that moved, while line mode mirrors what developers see in version control. Character mode is the most precise but also the busiest — use it when you suspect a tiny change you cannot find by eye.
A worked example
Put The quick brown fox on the left and The slow brown fox jumps on the right, in word mode. The LCS is "The brown fox" — those words survive in order. The tool marks quick as removed (struck through, red), slow as added (green), and jumps as added at the end. It then reports the statistics: +2 words added, −1 word removed, and a similarity score. Similarity is computed as twice the number of matching tokens divided by the total tokens in both texts, expressed as a percentage — so two identical texts read 100%, and texts with nothing in common approach 0%.
Inline versus side-by-side views
The inline view weaves both versions into one stream: deletions struck through in red, insertions highlighted in green, sitting next to the unchanged text. It is compact and good for short edits. The side-by-side view puts the original on the left with only its deletions marked and the new version on the right with only its additions marked, which makes it far easier to read a heavily rewritten passage. You can switch views freely; the underlying diff is the same, only the presentation changes.
Practical use cases
- Reviewing edits. Paste a draft and its revision to see exactly what an editor or collaborator changed, word for word.
- Catching silent config changes. Diff two versions of a settings file in line mode to find the one value that was altered.
- Comparing terms or contracts. Word mode surfaces every clause that was added, removed, or reworded.
- Verifying a copy-paste. Character mode confirms whether two strings that look identical truly are, down to a trailing space.
Common mistakes and limits
- Using character mode on long text. It produces an overwhelming amount of highlighting and is slow; reach for word or line mode unless you are hunting a single character.
- Forgetting whitespace counts. In word mode the spaces between words are tokens too, so a change in spacing can show up as a difference — usually what you want, occasionally surprising.
- Pasting huge inputs. The LCS algorithm builds a comparison grid, so cost grows with the product of the two token counts. This tool caps the combined size (around 20,000 tokens total) and warns you to trim the input rather than freezing the page.
- Expecting it to detect moved blocks. A paragraph relocated from top to bottom reads as one deletion plus one insertion, not a "move" — that is inherent to how diffs work.
Privacy
Both texts are compared entirely in your browser using the built-in algorithm — nothing is uploaded or stored on a server. That makes it safe to diff confidential drafts, internal config, or unreleased copy, and it works even with your network disconnected.