Text Diff Checker
The problem: Spotting differences between two versions of a document, code snippet, or API response by eye is error-prone and time-consuming.
ASG Privacy VerifiedVerified
100% In-Browser Execution. Zero server uploads. Your data never leaves this tab — disconnect your internet and the tool keeps working.
Text Diff Checker: the complete guide
A text diff checker compares two text inputs and highlights the differences: added content in green, removed content in red, and unchanged content in neutral — with a similarity percentage showing how closely the two texts match. This is the same diff algorithm used by Git, GitHub pull request reviews, and code review tools, implemented in pure browser-side JavaScript. Use it to compare code versions, document revisions, API response payloads, configuration files, or any two pieces of text without installing git or opening a terminal.
Line, word and character diff modes
Line-based diff is ideal for code, configuration files and multi-paragraph text — it shows which entire lines were added or removed, making structural changes clear. Word-based diff is better for prose documents and email drafts — it highlights exactly which words changed without flagging entire lines as different just because one word was edited. Character-based diff gives maximum granularity, useful for detecting typos, single-character changes, whitespace differences or subtle edits in short strings.
Similarity percentage and when it matters
The similarity score is the percentage of unchanged tokens (lines, words or characters) relative to the total. A 90% similarity means 90% of the text is identical — useful for plagiarism detection, deduplication checks, or validating that a refactored function preserved its original behavior. A score of 0% means the two texts share no common tokens at all.
Step by step: how to use Text Diff
- 1
Paste the original text in the left panel.
- 2
Paste the revised text in the right panel.
- 3
Select the diff mode: Lines (default), Words, or Characters.
- 4
Differences highlight automatically: green for additions, red for removals.
- 5
Read the stats bar for added count, removed count and similarity percentage.
- 6
Load the code sample to see a practical before/after JavaScript function comparison.
Security & privacy
Text comparison runs entirely in your browser tab using a pure JavaScript LCS (Longest Common Subsequence) implementation. The texts you paste — which may include confidential documents, unreleased code, sensitive configuration or personal data — never leave your device. No network requests are made at any point during comparison.